[PATCH/RFA] sh-elf: Unnecessary relocations

Stephen Clarke stephen.clarke@earthling.net
Wed Oct 2 11:54:00 GMT 2002


I'm seeing an sh assembler problem with the latest binutils:
I'm not sure if it's a result of the unnecessary relocations
patch or the gas relocs rewrite, but I suspect it's one or
the other ...

Here are the symptoms - the mov.l is misassembled,
so that it loads from the wrong location ...

[sclarke@localhost temp]$ cat test.s
        .text
        .balign 4
        .global lab2
        mov.l lab2,r0
        nop
lab2:
        .long 0
[sclarke@localhost temp]$ sh-elf-as -o test.o test.s
[sclarke@localhost temp]$ sh-elf-objdump -d test.o

test.o:     file format elf32-sh

Disassembly of section .text:

00000000 <lab2-0x4>:
   0:   d0 01           mov.l   8 <lab2+0x4>,r0
   2:   00 09           nop

00000004 <lab2>:
   4:   00 00           .word 0x0000
        ...
[sclarke@localhost temp]$ 

Steve.


__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com



More information about the Binutils mailing list