This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: On resolving the MIPS gas branch reloc issue


On Mar  9, 2003, Thiemo Seufer <ica2_ts at csv dot ica dot uni-stuttgart dot 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 at {redhat dot com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva at {lsd dot ic dot unicamp dot br, gnu.org}
Free Software Evangelist                Professional serial bug killer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]