Crosscompiling for ARM: reloc type R_ARM_ABS32 is not supported for PIC - how to solve ?

Nov 15, 2020 2 Replies

First reply

Tauno Voipio

Your problem is ucLinux. The complaint comes from the last stage of the run file generation, where the executable is converted to form suitable for hardware without a memory translation unit. I do not have a recipe to rectify the situation.

Read the full reply

I'm trying to crosscompile MQTT client for ARM platform. At the final step, creation of binaries, the system reports errors below.



I guess that I overlooked something...



What could be the reason ? I'm not sure whether this is the problem of program I compile, or toolchain or any setting ?



Thanks in advance, regards, R.



Log : .... ... arm-2010q1/arm-uclinuxeabi/bin/elf2flt: error: reloc type R_ARM_ABS32 is not supported for PIC arm-2010q1/arm-uclinuxeabi/bin/elf2flt: error: reloc type R_ARM_ABS32 is not supported for PIC arm-2010q1/arm-uclinuxeabi/bin/elf2flt: error: reloc type R_ARM_ABS32 is not supported for PIC arm-2010q1/arm-uclinuxeabi/bin/elf2flt: error: 6402 bad relocs collect2: ld returned 1 exit status make[1]: *** [Makefile:26: static_pub] Error 1 make[1]: Leaving directory 'mosquitto-1.6.12/client' make: *** [Makefile:59: mosquitto] Error 2


Your problem is ucLinux. The complaint comes from the last stage of the run file generation, where the executable is converted to form suitable for hardware without a memory translation unit.

I do not have a recipe to rectify the situation.

-TV

Sorry if this is stating the obvious, but R_ARM_ABS32 would seem to be an absolute address, which conflicts with PIC (ie Position Independent Code), which is, by definition, relocatable. What your fix is, I can't say, further.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required