[fpc-devel] Capability CPUARM_HAS_BLX_LABEL with ARM instruction set

Garry Wood garry at softoz.com.au
Wed Jan 6 06:26:09 CET 2016


>>While it's true that BLX always changes instructions set, I've heard some reports indicating that some assembler/linker combinations on OSX (apparently clang based?) have been behaving >>strangely with this lately.
>>GCC+binutils have always been following the "emit blx and let the linker
>>fix it" recipe, just as fpc does.
>>
>>Best Regards,
>>Jeppe
>
>I'm certainly using both as and ld (both arm-none-eabi for Win32 from launchpad.net) to produce the binary. The linker outputs an elf and I modified the MakeExecutable method in the compiler >to do an objcopy after the linker to obtain a binary image. I also get it to do objdump on the elf to produce a list file which is where I see the blx <label> appearing.
>
>I'll do some more searching based on the additional information from Jeppe to see if there is maybe a reported issue or an additional linker switch or something that is required.
>
>Thanks for the info.
>
>Garry.

Just following up on this, I noticed today a commit from Florian on December 29  that removes the use of BLX <Label> from both cgcpu.pas and arm.inc

Obviously someone here was able to obtain more info, which is lucky because my searching wasn't coming up with much at all.

Thanks to whoever worked out that both gcc and clang now use bl instead of blx, this completely resolves the issue for me with fpc as well.

Garry.






More information about the fpc-devel mailing list