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]

The problem with linkonce sections in ELF


Hi,

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.

Thanks.

-- 
H.J. Lu (hjl@gnu.org)

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