Page 1 of 1

Binutils changes

Posted: Fri May 09, 2008 1:42 am
by Legolas
Hello there!
Usually I use the binutils shipped with the devkitARM with Free Pascal, in order to compile pascal code for gba and nds. I have noticed a different behavior in the arm-eabi-ld 2.18.50 compared to the 2.17 shipped until dkARM 21. Seems that ld does not generate interworking stub calls: in fact in the map file generated with ld 2.17 I can notice:

Code: Select all

--- cut ---
.glue_7        0x0800b5e8       0x3c D:\devkitpro\devkitARM\lib\gcc\arm-eabi\4.3.0\thumb\crtend.o
                0x0800b619                __FadeToGrayScale_from_arm
                0x0800b5f4                __irqEnable_from_arm
                0x0800b60c                __iprintf_from_arm
                0x0800b600                __consoleInit_from_arm
                0x0800b5e8                __irqInit_from_arm
.glue_7        0x0800b624        0x0 D:\devkitpro\devkitARM\lib\gcc\arm-eabi\4.3.0\thumb\crtn.o
--- cut ---
where the same code with ld 2.18.50 generates:

Code: Select all

--- cut ---
.glue_7        0x0800b5d0        0x0 D:\devkitpro\devkitARM\lib\gcc\arm-eabi\4.3.0\thumb\crtend.o
.glue_7        0x0800b5d0        0x0 D:\devkitpro\devkitARM\lib\gcc\arm-eabi\4.3.0\thumb\crtn.o
--- cut ---
So my question is: there is a way, maybe a command line parameter to pass to ld, in order to handle this behavior? Or the interworking is now handled in a different way? By the way, Free Pascal can produce ARM code only, but I usually link libgba and libnds to the executables, so the interworking is required.
Thanks in advance :mrgreen:

Re: Binutils changes

Posted: Sat May 17, 2008 6:05 am
by WinterMute
It would appear that the interworking is now handled in a different manner. I've noticed that bl instructions are transformed to blx for armv5 code, haven't really investigated what happens with arm7 yet other than to verify binaries do in fact work when thumb & arm code is mixed.