KEEP sections without writing a complete linker script?
Thu Jun 17 17:54:00 GMT 2010
* Tristan Gingold <firstname.lastname@example.org> [10-06-17 18:12]:
> >>> | /usr/lib/gcc/avr/4.3.4/../../../avr/bin/ld: warning: keep_bootcall.x contains output sections; did you forget -T?
> > [...]
> >> How did you invoke gcc or ld ? It seems, according to the error message, that you forget the -T switch. Ie, you
> >> should use something like -Wl,-T,myscript.ld
> > Using -T would give me not the effect I wanted, as this would replace
> > the default linker script.
> Ok, you can use -Wl,-dT,-T,myscript.ld to also read the default linker script.
This won't work either, as -dT also expects a file name as parameter.
But after re-reading the documentation, if found that the INSERT command
does exactly what I want:
Using the script
| .bootcall_trampoline :
| INSERT AFTER .text
I may call the linker with "-T myscript.ld" and everything works as
Sorry for the noise,
More information about the Binutils