[committed, PATCH] PR binutis/18386: callw with 0x66 prefix incorrectly disassembled in 64-bit mode
Jan Beulich
JBeulich@suse.com
Tue May 12 09:42:00 GMT 2015
More information about the Binutils mailing list
Tue May 12 09:42:00 GMT 2015
- Previous message (by thread): [committed, PATCH] PR binutis/18386: callw with 0x66 prefix incorrectly disassembled in 64-bit mode
- Next message (by thread): [PATCH] xtensa: fix gas trampolines regression
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>>> On 11.05.15 at 15:33, <hjl.tools@gmail.com> wrote: > So AMD and Intel are different. I think > > data16 callq rel32 > > is better than > > callw rel16 > foobar I don't think so - neither is going to result in proper disassembly of following instructions when looked at from the opposite corner. I.e. disassembling as instruction with 2-byte displacement when it was written with a 4-byte one will yield rubbish for the two extra bytes, while disassembling as instruction with 4-byte displacement when it was written with a 2-byte one will wrongly consume the next instruction's first two bytes. Without the user telling you (via command line option or alike; in live gdb sessions it may also be possible to simply default to the CPU being run on) and without a relocation to infer the displacement size from, you just can't get it right (and what was there before your patch was as good or as bad as what is there now). But of course a pretty clear conclusion here is - unless people intentionally write vendor specific code, use of overrides with these instructions would perhaps best be considered invalidating the instructions altogether (i.e. an even more reasonable default in the absence of knowing any better might be to disassemble them just like other undefined ones). Jan
- Previous message (by thread): [committed, PATCH] PR binutis/18386: callw with 0x66 prefix incorrectly disassembled in 64-bit mode
- Next message (by thread): [PATCH] xtensa: fix gas trampolines regression
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list