This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: jmp label(,%eax,4) bug
- To: rob at icell dot hu
- Subject: Re: jmp label(,%eax,4) bug
- From: Alan Modra <alan at SPRI dot Levels dot UniSA dot Edu dot Au>
- Date: Fri, 14 Jan 2000 23:37:27 +1030 (CST)
- cc: gcc-bugs at gcc dot gnu dot org, gcc at packages dot debian dot org, hjl at gnu dot org, binutils at sourceware dot cygnus dot com
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)