jmp label(,%eax,4) bug
Alan Modra
alan@SPRI.Levels.UniSA.Edu.Au
Fri Jan 14 05:06:00 GMT 2000
On Fri, 14 Jan 2000 rob@icell.hu wrote:
> The problem is in the assembler:
> When I replace the 3 occurances of a
> jmp a_Label(,%eax,4)
> with
> push Label(,%eax,4)
> ret
> , everything is going fine.
This bug report should really have been sent to bug-gnu-utils@gnu.org, or
to binutils@sourceware.cygnus.com, but since it came here I'll annoy the
gcc list with a reply too :-)
>From your list of packages, it seems that the assembler version causing
problems was binutils-2.9.5.0.22, while binutils-2.9.1.0.25 was OK. This
is probably due to a bug I've only recently fixed.
Try the following with your assembler.
$ cat > z.s
jmp 2(,%eax,4)
$ as z.s
$ objdump -dr a.out
a.out: file format elf32-i386
Disassembly of section .text:
00000000 <.text>:
0: ff 2c 85 02 00 00 00 ljmp *0x2(,%eax,4)
Notice how the jmp has incorrectly turned into a ljmp.
The latest assembler (see http://sourceware.cygnus.com/binutils/ for info
on how to get a copy of the source) gives:
$ /usr/tmp/gas/gas/as-new z.s
z.s: Assembler messages:
z.s:1: Warning: Indirect jmp without `*'
$ objdump -dr a.out
a.out: file format elf32-i386
Disassembly of section .text:
00000000 <.text>:
0: ff 24 85 02 00 00 00 jmp *0x2(,%eax,4)
More information about the Binutils
mailing list