Hi Digit,
I have the same problem event if I add the following line in my Android.mk.
LOCAL_LDFLAGS += -Wl,--hash-style=both
the output when I add the above option:
WARNING: linker: pmdump: unused DT entry: type 0x6ffffef5 arg 0x3b0
WARNING: linker: pmdump: unused DT entry: type 0x6ffffffe arg 0x458
WARNING: linker: pmdump: unused DT entry: type 0x6fffffff arg 0x2
CANNOT LINK EXECUTABLE: cannot locate symbol "__register_atfork" referenced by "pmdump"...
My program named pmdump.
If I remove the above option from my Android.mk, the output:
WARNING: linker: pmdump: unused DT entry: type 0x6ffffef5 arg 0x3b0
WARNING: linker: pmdump: unused DT entry: type 0x6ffffffe arg 0x400
WARNING: linker: pmdump: unused DT entry: type 0x6fffffff arg 0x2
CANNOT LINK EXECUTABLE: empty/missing DT_HASH in "pmdump" (built with --hash-style=gnu?)
I am using the AOSP 6.0 source code and environment to build my program, and the final executable work fine on my device which runs Android 6.0.
And it doesn't work on my another device which runs Android5.1.
I tried to using the AOSP 5.1 source code and environment to build my program without the ld option mentioned above, and the final executable work fine on my device which
runs Android 5.1 as well as my device runs Android 6.0.
It seems like that the difference build process between Android 6.0 and Android 5.1 cause the issue, I want to build my executable and runs well both in devices runs 6.0 and 5.1.
Any suggestion will be appreciated.
Thanks
在 2013年11月14日星期四 UTC+8下午7:00:04,Digit写道: