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: The problem with linkonce sections in ELF


   Date: Mon, 31 Jan 2000 18:45:19 -0800
   From: "H . J . Lu" <hjl@valinux.com>

   I think there is a problem with linkonce sections in ELF. When you
   have many linkonce sections, it is possible that many of them will
   be removed during the final link. As the result, there may be
   holes in the memory layout. Then BFD will try to create new segment
   to remove holes in the memory layout due to elimination of duplicated
   linkonce sections. It causes a problem when BFD creates more segments
   than what has been pre-allocated. That leads to

   home/hjl/bugs/gas/symbolic/ld: ex_f.so: Not enough room for program headers (allocated 3, need 4)
   /home/hjl/bugs/gas/symbolic/ld: final link failed: Bad value

   I was wondering if BFD should leave the holes alone while removing
   duplicated linkonce sections or we should modify the linker script such
   that those linkonce sections are at the end of each segment.

Duplicate linkonce sections are removed before section addresses are
assigned, so they should not leave any holes in the address space.

If they do leave holes in the address space, that is definitely a bug.
Do you have any reason to think that that is happening?

Ian

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