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: How to reclaim .rela.dyn entries for symbols that become hidden?


On Thu, Jun 30, 2005 at 05:41:36PM -0400, Carlos O'Donell wrote:
> On Thu, Jun 30, 2005 at 04:28:55PM -0400, Carlos O'Donell wrote:
> > > Somewere, you're allocating the space for them.  Probably this means
> > > that you're counting things incorrectly, or too early.  Is
> > > allocate_dynrelocs allocating space for them despite the fact that they
> > > are hidden?  If not, where's it come from.
> 
> *shrug*

I forgot .rela.got becomes part of the .rela.dyn section based on the
linker script. This accounts for the other 48 bytes, or 4 relocs that
appear in that section.

The problem is that during allocate_dynrelocs I only know it's
undefined, and it's not yet marked dynamic, and it doesn't have the
visibility set yet either. So I record it as a dynamic symbol, and
allocate it some space.

Later on it turns out to be hidden, and the space isn't needed, the
reloc isn't emitted.

I guess I somehow have to move this logic further back.

c.


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