Unknown EABI object attribute 44

872 views
Skip to first unread message

ffxx68

unread,
Jul 16, 2013, 8:23:06 AM7/16/13
to android...@googlegroups.com
Hi,

while recompiling a binary using the 4.4.3 Android NDK toolchain and linking it to an ASOP JB build, I get the warnings "Unknown EABI object attribute 44", as below:

[...]
  CC       test/srvctl.c
test/srvctl.c: In function 'main':
test/srvctl.c:161: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  LD      
test/release/target/srvctl
/media/u01/android-ndk-r8b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: Warning: /media/u02/RenesasEV2/jb/out/target/product/emev/obj/lib/crtbegin_dynamic.o: Unknown EABI object attribute 44
/media/u01/android-ndk-r8b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: Warning: /media/u02/RenesasEV2/jb/out/target/product/emev/obj/lib/crtend_android.o: Unknown EABI object attribute 44


Then, pushing the binary onto device and executing it I get a crash:

root@android:/vendor/bin # ./srvctl                                        
Segmentation fault


Note as the core happens even before tool "usage" message is shown. So, it is not a code, but a compile issue, I guess...

I'm not sure if that's the reason of the crash, but comparing the ELF attributes of the objects being linked above, they refer to the

$ arm-none-linux-gnueabi-readelf -A ./test/srvctl.o
Attribute Section: aeabi
File Attributes
  Tag_CPU_name: "7-A"
  Tag_CPU_arch: v7
  Tag_CPU_arch_profile: Application
  Tag_ARM_ISA_use: Yes
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align_needed: 8-byte
  Tag_ABI_align_preserved: 8-byte, except leaf SP
  Tag_ABI_enum_size: int
  Tag_ABI_optimization_goals: Aggressive Size

$ arm-none-linux-gnueabi-readelf -A /media/u02/RenesasEV2/jb/out/target/product/emev/obj/lib/crtbegin_dynamic.o
Attribute Section: aeabi
File Attributes
  Tag_CPU_name: "5TE"
  Tag_CPU_arch: v5TE
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-1
  Tag_FP_arch: VFPv2
  Tag_DIV_use: Not allowed


Looks like the JB (AOSP build) object is of CPU type "v5", while I expected it all to be a "v7", as defined in my device target types:

 BoardConfig.mk:TARGET_CPU_ABI := armeabi-v7a
 BoardConfig.mk:TARGET_ARCH_VARIANT = armv7-a-neon


(device project discussed at https://groups.google.com/forum/?fromgroups=#!forum/renesas-emev-osp)

Actually, this file is found in a "prebuilt" directory, under JB AOSP:

 prebuilts/ndk/android-ndk-r7/platforms/android-4/arch-arm/usr/lib/crtbegin_dynamic.o

Could the cpu type mismatch be an issue?

Any other suggestion, about what to check?

thanks in advance

ffxx68

unread,
Jul 16, 2013, 9:49:51 AM7/16/13
to android...@googlegroups.com
After using the AOSP JB the same warnings are shown (as well as the crash....)

So, the toolchain mismatch isn't a cause.

Still, I don't understand what these options reported by readelf may come from:

 ...
  Tag_ABI_optimization_goals: Aggressive Speed
  Tag_unknown_44: 1 (0x1)

David Turner

unread,
Jul 16, 2013, 2:22:05 PM7/16/13
to ffu...@googlemail.com, android-porting
Why are you using 4.4.3 exactly? And with NDK r8b? This toolchain and NDK are really dated and should be considered obsolete.

The issue is mainly that its linker is based on a very old version of binutils that doesn't support the EABI attributes that were added to the C runtime object files (e.g. crtbegin_dynamic.o) to help gdb properly detect Android binaries.

The fix is to use a more recent toolchain. First try to upgrade to NDK r8e, and if this doesn't work, fix to GCC 4.6.


--
--
unsubscribe: android-porti...@googlegroups.com
website: http://groups.google.com/group/android-porting
 
---
You received this message because you are subscribed to the Google Groups "android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-porti...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages