Can LD give warnings about the non-static functions defined but never used explicitly?

Nick Clifton nickc@redhat.com
Wed Nov 26 10:09:00 GMT 2008


Hi Pan,

> One more question. I have some data stored in a special section. These
> data are not referenced within the program but these data are useful
> to an external loader. In this case, how to let LD know the data are
> `used' and keep them on linking.

If you are using your own linker script, which is likely given that you 
have this special section, then you can use the KEEP linker script 
directive to ensure that this section is not removed when the linker 
performs its garbage collection.

Cheers
   Nick




More information about the Binutils mailing list