bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/3041] Bogus jump to weak symbol on m68k-unknown-netbsd


From: vincent dot riviere at freesbee dot fr
Subject: [Bug gas/3041] Bogus jump to weak symbol on m68k-unknown-netbsd
Date: 9 Sep 2006 10:31:24 -0000

------- Additional Comments From vincent dot riviere at freesbee dot fr  
2006-09-09 10:31 -------
A lot better this time !
But half-fixed.

$ as bug.s -o bug.o
$ objdump -d bug.o

bug.o:     file format a.out-m68k-netbsd

Disassembly of section .text:

00000000 <mylabel-0x8>:
   0:   4ef9 0000 0010  jmp 10 <mylabel+0x8>
   6:   4e71            nop

00000008 <mylabel>:
   8:   4e71            nop
        ...

We can see a strange value for the jmp (0x10), but it dosn't matter because...

$ objdump -r bug.o

bug.o:     file format a.out-m68k-netbsd

RELOCATION RECORDS FOR [.text]:
OFFSET   TYPE              VALUE
00000002 32                mylabel

... the relocation is good !

Let's go ahead and link it :
$ ld bug.o -o bug
$ objdump -d bug

bug:     file format a.out-m68k-netbsd

Disassembly of section .text:

00002020 <bug.o>:
    2020:       4ef9 0000 2038  jmp 2038 <__etext+0xc>
    2026:       4e71            nop

00002028 <mylabel>:
    2028:       4e71            nop
        ...

0000202c <__etext>:
        ...

Bad : The value of the jump should be 0x2028, but it is 0x2038

$ objdump -r bug

bug:     file format a.out-m68k-netbsd

And there is no relocation.

Note that I obtain the same result when I link bug.o using ld 2.14.
So I thing there is still a problem with gas.

Nice work... just another effort and you'll get it !


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW


http://sourceware.org/bugzilla/show_bug.cgi?id=3041

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]