View Issue Details

IDProjectCategoryView StatusLast Update
0028669FPCCompilerpublic2016-09-22 10:06
Reportersimon,choiAssigned ToYuriy Sydorov 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformAndroidOSAndroid OS Version6.0
Product Version3.1.1Product Buildr31577 
Target Version3.0.2Fixed in Version3.0.2 
Summary0028669: Android 6.0 reject (crash) app with text relocations
DescriptionAndorid 6.0 (API 23) can't loading FPC Shared Library (*.so)

FPC App (Shared Library) works until API 22
But FPC App crash when set API 23

ex. AndroidManifest.xml
 <uses-sdk android:minSdkVersion = "10"
            android:targetSdkVersion = "23" />
Steps To ReproduceStep 0000001. Write Simple Program
         library armeabi_v7a_test;

         {$mode delphi}
         {$packrecords c}

         Function test (env : PJNIEnv; this: jobject): integer; cdecl;
          begin
           Result := 100;
          end;

         exports
           JNI_OnLoad name 'JNI_OnLoad',
           JNI_OnUnload name 'JNI_OnUnload',
           test name 'Java_com_example_app1_test';
         end.

Step 0000002. Compile Pascal Code
Step 0000003. Check "Text
         arm-linux-androideabi-readelf.exe -a test.so

 
Additional Information- Other Same Situation
   http://slowbutdeadly.blogspot.kr/2015/09/javalangunsatisfiedlinkerror-dlopen.html

- ADB Message
   Until API <=22 , adb show warning "Has Text Relocations"
   When API = 23 , adb show message "Has Text Relocations" and crash
TagsNo tags attached.
Fixed in Revision31739
FPCOldBugId
FPCTarget
Attached Files

Activities

lifepower

2015-09-17 17:38

reporter   ~0085984

From compiler options, I see there is "-Cg" flag, which should resolve this. Isn't it working?

simon,choi

2015-09-18 02:26

reporter   ~0085998

This bug was removed by Yury Sidorov.
use FPC 3.1.1 (above svn r31739).

@lifepower : -Cg Option can't fix this. because It's issue with FPC startup related.

Thanks.

Issue History

Date Modified Username Field Change
2015-09-12 16:51 simon,choi New Issue
2015-09-17 17:38 lifepower Note Added: 0085984
2015-09-18 02:26 simon,choi Note Added: 0085998
2015-09-21 17:35 Jonas Maebe Fixed in Revision => 31739
2015-09-21 17:35 Jonas Maebe Status new => resolved
2015-09-21 17:35 Jonas Maebe Fixed in Version => 3.1.1
2015-09-21 17:35 Jonas Maebe Resolution open => fixed
2015-09-21 17:35 Jonas Maebe Assigned To => Yuriy Sydorov
2016-09-22 10:04 Yuriy Sydorov Status resolved => closed
2016-09-22 10:04 Yuriy Sydorov Target Version => 3.0.2
2016-09-22 10:06 Yuriy Sydorov Fixed in Version 3.1.1 => 3.0.2