I have had no trouble specifiying the linker script using the -T
switch to gcc. I am now trying to specify the linker script from a
specs file like so:

%rename link old_link
*link:
-Thello.ld%s %(old_link)

gcc complains though about linking Thumb code against ARM libraries --
I've specified -mthumb to gcc --
/opt/pathport/lib/gcc/arm-elf/3.4.0/../../../../arm-elf/bin/ld:
/opt/pathport/arm-elf/lib/libc.a(memset.o)(memset): warning:
interworking not enabled.

Why does the above specs snippet cause gcc to forget it's linking
against thumb libraries?

Please cc me in your reply. Thanks,
Shaun

$ arm-elf-gcc --version | head -1
arm-elf-gcc (GCC) 3.4.0
$ cat hello.c
int main() { return 0; }
$ cat hello.specs
%rename link old_link
*link:
-Thello.ld%s %(old_link)
$ diff /opt/pathport/arm-elf/lib/ldscripts/armelf.xc hello.ld
12c12
<   PROVIDE (__executable_start = 0x8000); . = 0x8000;
---
>   PROVIDE (__executable_start = 0x2000000); . = 0x2000000;
181c181
<     .stack         0x80000 :
---
>     .stack         0x21000000 :
$ arm-elf-gcc -mthumb -Thello.ld hello.c
$ arm-elf-gcc -mthumb -specs=hello.specs hello.c 2>&1 | head -1
/opt/pathport/lib/gcc/arm-elf/3.4.0/../../../../arm-elf/bin/ld:
/opt/pathport/arm-elf/lib/libc.a(memset.o)(memset): warning:
interworking not enabled.

Reply via email to