This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] MIPS bfd: abi 64 ld -r
On Sep 4, 2002, Alexandre Oliva <aoliva@redhat.com> wrote:
>> I would like to see the exact case so I can try to reproduce it here.
> I'll try to come up with something for you soonish.
Ok, here comes the obvious testcase:
.data
foo:
.word bar
bar:
assemble it with the IRIX assembler (n32), and you get:
0000000000000000 <.data>:
0: 00000004 sllv $zero,$zero,$zero
0: R_MIPS_32 .data
^ note the in-place addend, ^ nothing here
now link this with the GNU linker, before installing the patch, and
you get:
0000000010100098 <_fdata>:
10100098: 10100098 beq $zero,$s0,101002fc <__bss_start+0x244>
^^ oops, where did the +4 go?
but if you link it with the IRIX linker, you get:
0000000010014000 <.data>:
10014000: 10014004 beq $zero,$at,0x10024014
^ here it is
I've just noticed, with this old build of GNU ld I still had around on
the IRIX box, that `ld -r'ing the object file produced by GNU as
produces even worse results:
ld-new: test.o: relocation size mismatch in t.os section .data
I don't have an IRIX-hosted newer native toolchain to verify whether
this problem is already fixed, or if the patch has fixed it, but ld -r
seems to have worked for me lately. At least it generates an object
file at the end; I still don't know whether the result of the linking
is usable :-)
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer