This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Can LD give warnings about the non-static functions defined but never used explicitly?
On Wed, Nov 26, 2008 at 10:03:45AM +0800, Pan ruochen wrote:
> > Compile your code with -ffunction-sections -fdata-sections.
> >
> > Then link with -Wl,--gc-sections
>
> 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.
Specify a symbol in that section on the command line with -u.
--
Alan Modra
Australia Development Lab, IBM