This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]