gas generating bad code for i386
Tom Riddle
ftr@oracom.com
Thu Mar 9 07:22:00 GMT 2000
Alan Modra wrote:
>
> gas did have a rather useless and probably unintentional "feature" in that
> it accepted `jmp constant' (and `call constant', `jc ...' etc.) and
> generated a `jmp' opcode with `constant' as the operand. ie. you got a
> jmp, with offset `constant' relative to the *next* instruction. All quite
> confusing really.
>
Yes, and this 'feature' disappeared somewhere between 2.9.1.0.23 and
2.9.5.0.22
and this was the cause of my problem. I must admit that 'call 4' seemed
a little strange at the time that I wrote it, but it worked. I haven't
done assembly in a while and was having trouble remembering the
PC-relative
syntax. I have since changed the code as per Ian's suggestion - except
it's .+6, not 4.
Thanks to all for your help,
Tom
--
Tom Riddle
Oracom, Inc.
http://www.oracom.com
Tel. +1 978.557.5710x305
Fax +1 978.557.5716
More information about the Binutils
mailing list