On resolving the MIPS gas branch reloc issue

Alexandre Oliva aoliva@redhat.com
Tue Mar 11 17:15:00 GMT 2003


On Mar  9, 2003, Thiemo Seufer <ica2_ts@csv.ica.uni-stuttgart.de> wrote:

> I did some successful tests, mainly for n64 non-PIC, but nothing
> really complicated WRT branch relocations. The testsuite worked,
> too, but OTOH there still aren't NewaBI tests.

Here's a simple test, for starters:

$ cat t.s
.globl foo
.space 8
.ent foo
foo:
.space 16
        b foo
.end foo
$ as -64 -KPIC t.s -o t.o
$ objdump -dr t.o
[snip]
0000000000000008 <foo>:
        ...
  18:   10000000        b       1c <foo+0x14>
                        18: R_MIPS_PC16 foo+0x14
[snip]
$ ld -melf64btsmip t.o -o t
$ objdump -dr t
[snip]
00000000100000e8 <foo>:
        ...
    100000f8:   10000001        b       10000100 <foo+0x18>
[snip]

-- 
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



More information about the Binutils mailing list