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: Daniel Jacobowitz <drow at false dot org>
- To: Carlos O'Donell <carlos at systemhalted dot org>
- Cc: Alan Modra <amodra at bigpond dot net dot au>, 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: Mon, 4 Jul 2005 11:43:32 -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> <20050701211312.GZ5269@systemhalted.org> <20050704021830.GQ28975@bubble.grove.modra.org> <20050704154032.GF5269@systemhalted.org>
On Mon, Jul 04, 2005 at 11:40:36AM -0400, Carlos O'Donell wrote:
> On Mon, Jul 04, 2005 at 11:48:30AM +0930, Alan Modra wrote:
> > On Fri, Jul 01, 2005 at 05:13:13PM -0400, Carlos O'Donell wrote:
> > > 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.
> >
> > Yeah, it pays to debug this sort of problem with -z nocombreloc
>
> I'm still stuck. At the point in allocate_dynrelocs the undefined
> symbol is not marked dynamic, or hidden for matter. I am forced to
> allocate space.
How are symbols becoming hidden after allocate_dynrelocs? Where does
it happen?
> Now the question I don't clearly understand is: After having
> allocated that space, can I go back and change the section size in
> relocate_section, like this:
>
> sec = htab->sgot;
> sec->size -= GOT_ENTRY_SIZE;
No. We've fixed file offsets after allocation.
> Second question: Where do __init_array_start, __init_array_end,
> __fini_array_start, and __fini_array_end resolve to?
>
> Are these provided by the linker's internal script?
ld/emultempl/elf32.em:
gld${EMULATION_NAME}_provide_bound_symbols (".init_array",
"__init_array_start",
"__init_array_end");
--
Daniel Jacobowitz
CodeSourcery, LLC