JohnnyonFlame / droidports

A repository for experimenting with elf loading and in-place patching of android native libraries on non-android operating systems.
GNU General Public License v3.0
45 stars 9 forks source link

Link error on 64bit raspberry pi os #6

Closed JeremiahDBrown closed 1 year ago

JeremiahDBrown commented 1 year ago

I think this is specific to the 64bit RPi OS, but it's possible I'm just missing a specific library. I attempted to follow the build instructions, and it gets most of the way through the build. There are few warnings that pop up, but all the compiles complete successfully. At the final linking step, it runs into an error trying to find all the _aeabi* functions:

[100%] Linking C executable gmloader
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x4c8): undefined reference to '__aeabi_d2f'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x4d8): undefined reference to '__aeabi_d2iz'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x4e8): undefined reference to '__aeabi_d2lz'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x4f8): undefined reference to '__aeabi_d2uiz'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x508): undefined reference to '__aeabi_d2ulz'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x518): undefined reference to '__aeabi_dadd'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x528): undefined reference to '__aeabi_dcmpeq'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x538): undefined reference to '__aeabi_dcmpge'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x548): undefined reference to '__aeabi_dcmpgt'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x558): undefined reference to '__aeabi_dcmple'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x568): undefined reference to '__aeabi_dcmplt'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x578): undefined reference to '__aeabi_ddiv'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x588): undefined reference to '__aeabi_dmul'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x598): undefined reference to '__aeabi_dsub'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x5a8): undefined reference to '__aeabi_f2d'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x5b8): undefined reference to '__aeabi_f2iz'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x5c8): undefined reference to '__aeabi_f2uiz'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x5d8): undefined reference to '__aeabi_fadd'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x5e8): undefined reference to '__aeabi_fcmpeq'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x5f8): undefined reference to '__aeabi_fcmpge'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x608): undefined reference to '__aeabi_fcmpgt'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x618): undefined reference to '__aeabi_fcmple'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x628): undefined reference to '__aeabi_fcmplt'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x638): undefined reference to '__aeabi_fdiv'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x648): undefined reference to '__aeabi_fmul'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x658): undefined reference to '__aeabi_fsub'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x668): undefined reference to '__aeabi_i2d'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x678): undefined reference to '__aeabi_i2f'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x688): undefined reference to '__aeabi_idiv'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x698): undefined reference to '__aeabi_idivmod'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x6a8): undefined reference to '__aeabi_l2d'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x6b8): undefined reference to '__aeabi_l2f'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x6c8): undefined reference to '__aeabi_ldivmod'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x6d8): undefined reference to '__aeabi_ui2d'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x6e8): undefined reference to '__aeabi_ui2f'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x6f8): undefined reference to '__aeabi_uidiv'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x708): undefined reference to '__aeabi_uidivmod'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x718): undefined reference to '__aeabi_ul2d'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/math_bridge.c.o:(.data.rel+0x728): undefined reference to '__aeabi_uldivmod'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/misc_bridges.c.o:(.data.rel+0x8): undefined reference to '__gnu_Unwind_Find_exidx'
/usr/bin/ld: CMakeFiles/gmloader.dir/bridges/misc_bridges.c.o:(.data.rel+0x18): undefined reference to '__gnu_Unwind_Find_exidx'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/gmloader.dir/build.make:501: gmloader] Error 1
make[1]: *** [CMakeFiles/Makefile2:115: CMakeFiles/gmloader.dir/all] Error 2
make: *** [Makefile:103: all] Error 2
JohnnyonFlame commented 1 year ago

There is no support for ARM64 yet. You need an ArmHF toolchain & userspace libraries.