Not enough room for program headers (problem with 2.11.92.0.5)

Jakub Jelinek jakub@redhat.com
Thu Oct 18 09:38:00 GMT 2001


On Wed, Oct 17, 2001 at 08:24:21AM -0700, H . J . Lu wrote:
> > 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.

Can I get a copy of misc.o (or misc.i)?
-z combreloc really should be the default, the speed advantages are huge, so
if there is some issue with it, I'd like to debug it.

	Jakub



More information about the Binutils mailing list