This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: How to reclaim .rela.dyn entries for symbols that become hidden?
- From: Carlos O'Donell <carlos at systemhalted dot org>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: binutils at sources dot redhat dot com, Randolph Chung <tausq at debian dot org>,John David Anglin <dave dot anglin at nrc-cnrc dot gc dot ca>
- Date: Fri, 1 Jul 2005 17:13:13 -0400
- Subject: Re: How to reclaim .rela.dyn entries for symbols that become hidden?
- References: <20050630165918.GG5269@systemhalted.org> <20050630173057.GB16536@nevyn.them.org> <20050630202853.GP5269@systemhalted.org> <20050630214132.GR5269@systemhalted.org>
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.