PATCH: Print addend as signed

H. J. Lu hjl@lucon.org
Sat Jun 23 16:23:00 GMT 2007


On Sat, Jun 23, 2007 at 07:58:26PM +0930, Alan Modra wrote:
> On Fri, Jun 22, 2007 at 10:42:11AM -0700, H. J. Lu wrote:
> > I found it is easier to read when addend is printed as signed. If
> > it is accepted, I will try to update other testcases.
> 
> What happens on a 32-bit target if we are using a 64-bit bfd?

I don't see why it should be a problem. Otherwise 32-bit target
won't work with 64-bit bfd if addend is signed extended. Here is
a test for elf32-xtensa-be on Linux/Intel64:

bash-3.1$ cat x.s
        j too_far - 5
bash-3.1$ ./as-new -o x.o x.s        
bash-3.1$ ../binutils/objdump -dr x.o

x.o:     file format elf32-xtensa-be

Disassembly of section .text:

00000000 <.text>:
   0:   600000          j       0x4
                        0: R_XTENSA_SLOT0_OP    too_far-0x5

H.J.



More information about the Binutils mailing list