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


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