This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [committed, PATCH] Remove Disp16|Disp32 from 64-bit direct branches


Hi,

On Tue, 12 May 2015, H.J. Lu wrote:

> > This is with 2.23, so your patch would cause a regression:
> 
> 1. This happened before 20140923.

Same with current 2.25-branch.

> 2. Can you speculate what
> 
> " jmpw   4"
> 
> does?

It should do a jump to $nextip+offset, of course, just like a 32bit 
jump.  The disassembly is correct, because with a zero offset, that's 
indeed '4'.


Ciao,
Michael.

> > 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]