[committed, PATCH] Remove Disp16|Disp32 from 64-bit direct branches
Michael Matz
matz@suse.de
Tue May 12 13:49:00 GMT 2015
Hi,
On Tue, 12 May 2015, H.J. Lu wrote:
> This is what I got now:
>
> [hjl@gnu-6 tmp]$ cat x.s
> .text
> data16 jmp foo
> bar:
> mov %eax,%edx
> [hjl@gnu-6 tmp]$ gcc -c x.s
> [hjl@gnu-6 tmp]$ objdump -dwr x.o
>
> x.o: file format elf64-x86-64
>
>
> Disassembly of section .text:
>
> 0000000000000000 <bar-0x4>:
> 0: 66 e9 00 00 89 c2 data16 jmpq ffffffffc2890006
> <bar+0xffffffffc2890002> 2: R_X86_64_PC16 foo-0x2
>
> 0000000000000004 <bar>:
> 4: 89 c2 mov %eax,%edx
> [hjl@gnu-6 tmp]$
>
> Is that the same as what you got with binutils 2.25?
This is with 2.23, so your patch would cause a regression:
x.o: file format elf64-x86-64
Disassembly of section .text:
0000000000000000 <bar-0x4>:
0: 66 e9 00 00 jmpw 4 <bar>
2: R_X86_64_PC16 foo-0x2
0000000000000004 <bar>:
4: 89 c2 mov %eax,%edx
Ciao,
Michael.
More information about the Binutils
mailing list