> I forward ported your patch to binutils-000524 since I could not get
> my hands on 000524.
You can check out the CVS repository on sourceware.cygnus.com from 000424. I
think I told you how to do it. I haven't been working with my binutils
patches much this month, but I will probably verify them again soon.
> crt0s.s:7: Internal error, aborting at
> /../binutils-000524/gas/config/tc-mips.c line 4364 in macro
I've actually explicitly put an arort() there. If you look at line line 4364
there's a comment that explains why the abort() is there. It can be fixed,
but someone still has to do it. For now, just use -G 0.
> However, my relocations seem messed up! objdump fails reading them,
> IRIX elfdump seems confused though readelf seems to handle it fine.
I don't know what you're doing wrong. I could objdump it just fine. I
haven't tested with IRIX.
$ ../binutils/objdump -dr jimi-testcase.o
test.o: file format elf64-littlemips
Disassembly of section .text:
0000000000000000 <_start>:
0: 3c1d0000 lui $sp,0x0
0: R_MIPS_HIGHEST kernelInfoLocal
4: 67bd0000 daddiu $sp,$sp,0
4: R_MIPS_HIGHER kernelInfoLocal
8: 001dec38 dsll $sp,$sp,0x10
c: 67bd0000 daddiu $sp,$sp,0
c: R_MIPS_HI16 kernelInfoLocal
10: 001dec38 dsll $sp,$sp,0x10
14: 67bd0000 daddiu $sp,$sp,0
14: R_MIPS_LO16 kernelInfoLocal
18: dfbd0000 ld $sp,0($sp)
1c: 67bd6000 daddiu $sp,$sp,24576
20: 3c190000 lui $t9,0x0
20: R_MIPS_HIGHEST crtInit
24: 67390000 daddiu $t9,$t9,0
24: R_MIPS_HIGHER crtInit
28: 0019cc38 dsll $t9,$t9,0x10
2c: 67390000 daddiu $t9,$t9,0
2c: R_MIPS_HI16 crtInit
30: 0019cc38 dsll $t9,$t9,0x10
34: 67390000 daddiu $t9,$t9,0
34: R_MIPS_LO16 crtInit
38: 03200008 jr $t9
3c: 00000000 nop
40: 03e00008 jr $ra
...
I can't see anything that's obviously wrong with the assembler output either
so it should be fine.
> An interesing item (but may be a red herring) is that IRIX as(1) places
> R_MIPS_LO16 relocations int the .rel.text section, and gas(1) places
> them (an all relocations) in .rela.text
We can use both RELA and REL relocations in the 64-bit ABI. IRIX as tends to
switch from one to another.
Ulf
|