This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
The problem with linkonce sections in ELF
- To: binutils at sourceware dot cygnus dot com
- Subject: The problem with linkonce sections in ELF
- From: "H . J . Lu" <hjl at valinux dot com>
- Date: Mon, 31 Jan 2000 18:45:19 -0800
- Cc: Ian Lance Taylor <ian at zembu dot com>
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)