Skip to contentSkip to conversation

ld error with 2.0.12-davem

DISCUSSION Mike Shaver 2 participants 2 messages May 30, 1997 MIPS

lore
Share & tools
lore
#0 lore raw

Using Ralf's gcc and binutils, and davem's cvs'd linux-2.0.12, I get:
mips-linux-ld -static -N -e kernel_entry -mips2 -Ttext 0x88069000 \
arch/mips/kernel/head.o init/main.o init/version.o \
arch/mips/lib/lib.a /export/sgi-linux/kernel/mips-linux/lib/lib.a \
arch/mips/lib/lib.a -o vmlinux
mips-linux-ld: vmlinux: Not enough room for program headers \
(allocated 3, need 4)
mips-linux-ld: final link failed: Bad value
make: *** [vmlinux] Error 1

I've patched the Makefiles to use mips-linux instead of mipsel-linux, but that's about it.

Anyone know enough about gnu ld to help me with this?

Mike

Signature · 5 lines
#> Mike Shaver ([email protected]) Ingenia Communications Corporation 
#>                 Ignore the man behind the curtain.                  
#>                                                                     
#> "And then I realized that it never should have worked in the first  
#>  place.  Thus, it would not work again until rewritten." --- Anon.  
#1 lore raw
Quoted 9 lines

Using Ralf's gcc and binutils, and davem's cvs'd linux-2.0.12, I get:
mips-linux-ld -static -N -e kernel_entry -mips2 -Ttext 0x88069000 \
arch/mips/kernel/head.o init/main.o init/version.o \
arch/mips/lib/lib.a /export/sgi-linux/kernel/mips-linux/lib/lib.a \
arch/mips/lib/lib.a -o vmlinux
mips-linux-ld: vmlinux: Not enough room for program headers \
(allocated 3, need 4)
mips-linux-ld: final link failed: Bad value
make: *** [vmlinux] Error 1

This is typically caused by an inapropriate mixture of flags to ld, especially -Ttext and a linker script. In your case no linker script has been specified using a -T option, so the buildtin script is being used. Just check the right script in <prefix>/mips-linux/lib/ldscripts/.

Ralf