JMPADD reloc in MIPS ECOFF file
Alexander Voropay
alec@artcoms.ru
Tue Mar 1 17:49:00 GMT 2005
Hi!
Can anyone help me ? How to force MIPS binutils to emit an
ECOFF object file with JMPADDR relocs ?
I have an old MIPS-based X-Terminal, Tektronix TekXPress 338.
This device is based on the old MIPS VxWorks 5.0.4 (WIND 2.0 kernel).
I'm tryind to build an application with GCC/binutils.
As it is known, the VxWorks applications is just a "half-linked"
.o objects with undefined externals. The VxWorks itself
is a sort of huge ".so library". Never VxWorks versions are
using ELF, but my old version uses ECOFF.
http://tekxp-linux.hopto.org/pmwiki/pmwiki.php/Software/Toolchains
Unfortunately, built-in VxWork's `ld` accepts only REFHI, REFLO
and JMPADDR relocs but does not support for GPREL relocs while
the modern binutils emits GPREL.
I'm using a `objcopy` to convert from ELF to ECOFF.
How to make an ECOFF with JMPADDR relocs ?
$ mips-linux-gcc -O2 -mips1 -mno-half-pic -fno-pic -mno-abicalls -ffreestanding -c hellovx.c -o hellovx.elf
$ mips-linux-objcopy -O ecoff-bigmips hellovx.elf hellovx.ecoff
$ mips-linux-objdump -x hellovx.elf
...
RELOCATION RECORDS FOR [.text]:
OFFSET TYPE VALUE
00000004 R_MIPS_HI16 hello
00000008 R_MIPS_LO16 hello
00000014 R_MIPS_26 write
$ mips-linux-objdump -x hellovx.ecoff
...
RELOCATION RECORDS FOR [.text]:
OFFSET TYPE VALUE
0000000000000004 REFLO hello
0000000000000008 GPREL hello
0000000000000014 REFHI write
...
The R_MIPS_LO16 becames GPREL, but R_MIPS_26 --> REFHI ???
How it is possible ?
The binutils is 2.13.90.0.16 .
--
-=AV=-
More information about the Binutils
mailing list