We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
I am working on a project where i am trying to run an executable on android device by linking with the shared object.
Arm clang compiler/linker used: ARMCompiler6.19
OS: Windows and WSL(windows subsystem on linux running on ubuntu)
Demo files to describe the problem: demo.c and demo1.c each files has one simple add functions.
Issues:
1. Using the below commands on linux(WSL) i have created object files and archived it to a static library.
/opt/arm/developmentstudio-2019.0-1/sw/ARMCompiler6.19/bin/armclang --target=aarch64-arm-none-eabi -c -o demo.o demo.c -fpic/opt/arm/developmentstudio-2019.0-1/sw/ARMCompiler6.19/bin/armclang --target=aarch64-arm-none-eabi -c -o demo1.o demo1.c -fpic/opt/arm/developmentstudio-2019.0-1/sw/ARMCompiler6.19/bin/armar -r library.a demo.o demo1.o
2. Using the below commands i have created the .so shared object using arm linker itself instead of GCC or android NDK
/opt/arm/developmentstudio-2019.0-1/sw/ARMCompiler6.19/bin/armclang --target=aarch64-arm-none-eabi -c -o demo.o demo.c -fpic/opt/arm/developmentstudio-2019.0-1/sw/ARMCompiler6.19/bin/armclang --target=aarch64-arm-none-eabi -c -o demo1.o demo1.c -fpic/opt/arm/developmentstudio-2019.0-1/sw/ARMCompiler6.19/bin/armar -r library.a demo.o demo1.o/opt/arm/developmentstudio-2019.0-1/sw/ARMCompiler6.19/bin/armlink --fpic --shared -o library_a.so library.a\(*.o\)
Kindly share your inputs and feedback if anyone has faced this issue or any insight on what and why it is going wrong.
Thanks in advance.