This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
State of ELF64 for MIPS
- To: binutils at sources dot redhat dot com
- Subject: State of ELF64 for MIPS
- From: Josh Scheid <jscheid at SandCraft dot com>
- Date: Thu, 5 Apr 2001 15:27:06 -0700
Hi folks. I'm trying figure out the state of ELF64 for MIPS.
I grabbed binutils-2.11
./configure --host=sparc-sun-solaris2.6 --target=mips64-elf ; make ;
Regardless of whether I use
$AS -32 -EB foo.s -o foo.o
$LD --oformat elf32-bigmips -Ttext 0 foo.o -o foo.exe
or
$AS -64 -EB foo.s -o foo.o
$LD --oformat elf64-bigmips -Ttext 0 foo.o -o foo.exe
all the R_MIPS_26 look fine in the '.o' files. But the jump instructions
get built incorrectly by the linker in the latter example. It seems the
2-bit shift from 28-bit byte-address to 26-bit word-address isn't happening.
Source is
.text
Label0:
j Label1
nop
Label1:
nop
Using
$OBJDUMP --disassemble-all -x -m mips:mips64 foo.exe
the jump should encode to 0x08000003, but in the latter example it encodes to
0x0800000c.
Once again, I'm just trying to figure out what shape the support for
MIPS64/ELF64 is in. Thanks.
-Josh