This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: ld error: "Not enough room for program headers (allocated 3,need 4)"
- To: Kammerloher Josef <Josef dot Kammerloher at softlab dot de>
- Subject: Re: ld error: "Not enough room for program headers (allocated 3,need 4)"
- From: Alan Modra <alan at linuxcare dot com dot au>
- Date: Thu, 25 May 2000 17:27:30 +1000 (EST)
- cc: "'gcc-bugs at gcc dot gnu dot org'" <gcc-bugs at gcc dot gnu dot org>
On Thu, 25 May 2000, Kammerloher Josef wrote:
> I try to create a shared library (size 20-30 MB) on Linux (SuSe 6.4).
> gcc version 2.95.2 19991024 (release)
> GNU ld version 2.9.5 (with BFD 2.9.5.0.24)
> The linker fails with
>
> Not enough room for program headers (allocated 3, need 4)
> /usr/i486-suse-linux/bin/ld. final link failed: Bad value
> collect2: ld returned 1 exit status
>
> I studied the man pages and all newsgroups, and I asked some newsgroups, but
> had no success.
Here are some things to do:
o Study the info pages that come with ld.
See ld.info, Node: Builtin Functions, SIZEOF_HEADERS.
o Compare the elf linker scripts (probably in
/usr/i486-suse-linux/lib/ldscripts/ on your system) against standard
ones. eg. from ftp.varesearch.com/pub/support/hjl/binutils/ If they
are different, try the standard scripts.
o Delete SIZEOF_HEADERS from your linker script, and replace with a fixed
number. Try 1024.
o If all this fails, post a bug report to binutils@sourceware.cygnus.com
--
Linuxcare. Support for the Revolution.