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]
Other format: [Raw text]

Re: [PATCH] More aggressive --gc-sections


On Thu, Mar 18, 2004 at 12:40:25AM +0100, Eric Botcazou wrote:
> 	* elflink.h (elf_gc_mark_dynamic_ref_symbol): New function.
> 	(elf_gc_sections): Do not gracefully fail if dynamic sections have
> 	been created.  Instead call elf_gc_mark_dynamic_ref_symbol to
> 	mark dynamically referenced symbols.  Do not mark the whole graph
> 	rooted at .eh_frame, only the section proper.

Have you tested this when building shared libs?  I suspect that
elf_gc_mark_dynamic_ref_symbol won't do the right thing for shared libs,
specifically, that ELF_LINK_HASH_REF_DYNAMIC won't always be set.  You
will probably want to disable gc-sections for shared libs.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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