This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [committed, PATCH] Remove Disp16|Disp32 from 64-bit direct branches
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Michael Matz <matz at suse dot de>
- Cc: Jan Beulich <JBeulich at suse dot com>, Binutils <binutils at sourceware dot org>
- Date: Tue, 12 May 2015 06:57:17 -0700
- Subject: Re: [committed, PATCH] Remove Disp16|Disp32 from 64-bit direct branches
- Authentication-results: sourceware.org; auth=none
- References: <20150511212331 dot GA1838 at intel dot com> <5551F4E70200007800079575 at mail dot emea dot novell dot com> <CAMe9rOpDbkeFbmNbQh0a1AKhAQy-cH4HJu20o_ERQaoR6sTxbQ at mail dot gmail dot com> <55520C440200007800079718 at mail dot emea dot novell dot com> <CAMe9rOpFgSyJm-oceuDkrBYnBQGv01ywCc43WySqX21NTJYi4Q at mail dot gmail dot com> <555216370200007800079773 at mail dot emea dot novell dot com> <CAMe9rOpOx=SSUZnCFimn4fBzFqNRDch8QYLn3Os_y7EfQH65Qw at mail dot gmail dot com> <alpine dot LSU dot 2 dot 20 dot 1505121548100 dot 4883 at wotan dot suse dot de>
On Tue, May 12, 2015 at 6:49 AM, Michael Matz <matz@suse.de> wrote:
> 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:
1. This happened before 20140923.
2. Can you speculate what
" jmpw 4"
does?
> 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.
--
H.J.