This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Not enough room for program headers (problem with 2.11.92.0.5)
- To: Stephan Kulow <coolo at caldera dot de>
- Subject: Re: Not enough room for program headers (problem with 2.11.92.0.5)
- From: "H . J . Lu" <hjl at lucon dot org>
- Date: Wed, 17 Oct 2001 08:24:21 -0700
- Cc: binutils at sourceware dot cygnus dot com
- References: <200110151606.f9FG6Cc11900@ns.caldera.de> <20011016235027.A2251@lucon.org> <200110170947.f9H9lKi29941@ns.caldera.de>
On Wed, Oct 17, 2001 at 11:43:24AM +0200, Stephan Kulow wrote:
> On Wednesday 17 October 2001 08:50, H . J . Lu wrote:
>
> > Works fine with binutils 2.11.92.0.7, which I relased today.
> >
>
> I figured meanwhile what's the problem. The default for combreloc is changed
> in my version of binutils, so the test case would be this. The problem is the
Don't do that :-).
> combination of -z combreloc and -Ttext. If you leave out one of them, it
> works.
> I think it's my fault, but I want to report it nonetheless, maybe it's still
> a bug behind the scenes :)
>
> Greetings, Stephan
>
> # ld -v
> GNU ld version 2.11.92.0.7 20011016
> # gcc -v
> Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.2/specs
> gcc version 2.95.2 19991024 (release)
> # gcc -c misc.i
> # ld -z combreloc -m elf_i386 -Ttext 0x100000 misc.o
> ld: a.out: Not enough room for program headers (allocated 2, need 3)
> ld: final link failed: Bad value
>
Don't use -z combreloc in this case. That is one reason why I didn't
turn on -z combreloc by default in my binutils. It should only be done
when it makes senses and is safe. It looks like no one should turn on
-z combreloc by default unless everything is worked out.
H.J.