How to reclaim .rela.dyn entries for symbols that become hidden?
Carlos O'Donell
carlos@systemhalted.org
Fri Jul 1 21:13:00 GMT 2005
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.
More information about the Binutils
mailing list