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: gc-section


On Mon, Mar 18, 2002 at 07:46:00PM -0500, Daniel Jacobowitz wrote:
> On Tue, Mar 19, 2002 at 10:55:21AM +1030, Alan Modra wrote:
> > > Is this 'drop' the only problem one will come across if one were to have GC
> > > work with shared libraries ?
> > 
> > You would also need to traverse all dynamic symbols the library
> > exports, and ensure that you don't drop their sections.  The library
> > itself may not reference all of it's symbols.
> 
> Is gc-sections even generally feasible in a dynamically linked binary? 

I think it's feasible with back-end support, but may not actually gain
much because of the implicit reference to exported symbols.  Hmm, a
dynamically linked application probably needs a pass over exported
symbols in the same manner as a shared lib will, to satisfy potential
references from shared libs back into the application.

-- 
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]