This is the mail archive of the binutils@sourceware.cygnus.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]

Re: Your change to ldlang.c


On Fri, Jul 02, 1999 at 10:26:20AM -0400, Ian Lance Taylor wrote:

>    I believe this change is needed for Linux/MIPS. Check with the
>    Linux/MIPS people before reverting it.
> 
> Actually, it was the Linux/MIPS people who suggested using LINK_ONCE
> for .reginfo.  Once that is done, the change to elf32.em becomes no
> longer necessary (modulo concerns about ld -r).  That is why they took
> it out--not because they needed the change, but because other changes
> they made meant that that code was no longer needed.

It was me who suggested that change but it's not a Linux/MIPS specific
change.  The problem was that ld combined all the .reginfo sections,
each 0x18 bytes long.  Now assume we have a few hundred object files for
a thing like libc.  Then the sum of these files gets longer than let's
say two pages.  The linker assigns the addresses to the sections, then
does the segment layout.  Finally the MIPS backend changes the size of
the combined .reginfo section back to 0x18 bytes.

The result: We now get an unused page in the memory layout, so ld will
split that segment into two segments and we run out of space in the
header table.  Boom, linker crash.  That' how I remember things, not
shure if the details are correct.

  Ralf

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