This is the mail archive of the binutils@sources.redhat.com 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]

Re: Small? request for ld --gc-sections


On Wed, Aug 15, 2001 at 05:57:14PM +0200, Etienne Lorrain wrote:
> 
>  I have at the end of my linker file:
> library_sprintf = sprintf ;
>  And in one configuration, the symbol "library_sprintf" is not used,
>  "sprintf" is not used neither, but the function "sprintf" is included
>  in the link (ld --gc-section) because of this linker line.

I can't reproduce this behaviour. ie. I can reference a function in the
linker script via an assignment, and have the function removed.  Are you
sure garbage collection is being done at all?  Note that if linking
against a shared lib, gc won't run.

Mon Oct  5 10:06:22 1998  Catherine Moore  <clm@cygnus.com>

	* elflink.h (elf_gc_sections):  Do not allow garbage
	collection if dynamic sections have been created.

I'm not sure why there is this restriction.  Catherine?

Alan


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