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:

> > Actually also that one is correctly printed I think (from a hello world
> > main, where I added a jmprel16 +0):
> >
> > 000000000040055c <main>:
> >   40055c:       55                      push   %rbp
> >   40055d:       48 89 e5                mov    %rsp,%rbp
> >   400560:       48 83 ec 30             sub    $0x30,%rsp
> >   400564:       c6 45 d1 00             movb   $0x0,-0x2f(%rbp)
> >   400568:       c6 45 d0 61             movb   $0x61,-0x30(%rbp)
> >   40056c:       48 8d 45 d0             lea    -0x30(%rbp),%rax
> >   400570:       48 89 c2                mov    %rax,%rdx
> >   400573:       be 44 06 40 00          mov    $0x400644,%esi
> >   400578:       66 e9 00 00             jmpw   57c <_init-0x3ffe8c>
> >
> > 000000000040057c <next>:
> >   40057c:       bf 52 06 40 00          mov    $0x400652,%edi
> >   ...
> >
> > It shows that rip is going to be truncated.
> >
> 
> This is the same issue as
> 
> https://sourceware.org/bugzilla/show_bug.cgi?id=18386
> 
> On Intel processors, 0x66 prefix before direct 32-bit unconditional
> call/jmp is ignored.  Whatever we do is wrong on AMD or Intel
> processors.

Well, in that case I'd say the correct thing to do is to _not_ do any 
change, but rather let bintils work like it always did and resolve the 
above bug report as WONTFIX (or unfixable or something).


Ciao,
Michael.


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