Lars Noschinski
2010-06-17 13:15:11 UTC
Hi,
is there a way to explicitely KEEP a section without needing to write a
whole new linker file?
It seemed to me that using a script which is appended to the default
script is a way to go, so I wrote the following script:
| SECTIONS
| {
| .bootcall_trampoline :
| {
| *(.bootcall_trampoline)
| KEEP(*(.bootcall_trampoline))
| }
| }
This seems to work, but gives me the annoying warning
| /usr/lib/gcc/avr/4.3.4/../../../avr/bin/ld: warning: keep_bootcall.x contains output sections; did you forget -T?
So I have got two questions:
- Is my approach correct?
- If yes, can this warning be suppressed?
Greetings,
Lars Noschinski
is there a way to explicitely KEEP a section without needing to write a
whole new linker file?
It seemed to me that using a script which is appended to the default
script is a way to go, so I wrote the following script:
| SECTIONS
| {
| .bootcall_trampoline :
| {
| *(.bootcall_trampoline)
| KEEP(*(.bootcall_trampoline))
| }
| }
This seems to work, but gives me the annoying warning
| /usr/lib/gcc/avr/4.3.4/../../../avr/bin/ld: warning: keep_bootcall.x contains output sections; did you forget -T?
So I have got two questions:
- Is my approach correct?
- If yes, can this warning be suppressed?
Greetings,
Lars Noschinski