Package: binutils
Version: 2.19.51.20090805-1
Severity: normal

First of, a totally reduced minimal testcase. Let's try it on MirBSD:

t...@herc:~ $ cat >testmin.s
        .intel_syntax noprefix
        .text
        .code16
        .globl  _start
_start: ljmp    0xF000,0xFFF0
t...@herc:~ $ cc -nostdlib -Wl,--oformat,binary -Wl,-Ttext,0 testmin.s
t...@herc:~ $ hd a.out
00000000  EA F0 FF 00 F0          -                          |.....|
t...@herc:~ $ as -V
GNU assembler version 050707 () using BFD version 050707 20050707

This is an i386 native GNU as, targetting (here) i8086 (due to the .code16
pseudo-op) and using Intel syntax, as opposed to that cruel AT&T syntax,
which thankfully has been supported by about every i386 gas from 1999 and
later.

It fails on Debian sid though (both amd64 and i386, I only have an i386
sid schroot though):

t...@frozenfish:~ $ as testmin.s
testmin.s: Assembler messages:
testmin.s:5: Error: too many memory references for jmp'
1|t...@frozenfish:~ $ as -V
GNU assembler version 2.19.51 (i486-linux-gnu) using BFD version (GNU Binutils 
for Debian) 2.19.51.20090805

Oh how great. Let's try the i386 lenny schroot.

t...@frozenfish:~ $ as testmin.s
t...@frozenfish:~ $ file a.out
a.out: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
t...@frozenfish:~ $ objdump -d -Mintel,i8086 a.out

a.out:     file format elf32-i386

Disassembly of section .text:

00000000 <_start>:
   0:   ea f0 ff 00 f0          jmp    0xf000:0xfff0
t...@frozenfish:~ $ as -V
GNU assembler version 2.18.0 (i486-linux-gnu) using BFD version (GNU Binutils 
for Debian) 2.18.0.20080103

Cool, it works there... (objdump on BSD shows s/:/,/ otherwise the same)

Now I install binutils-doc and "info as", then I read that the syntax for
far jumps has changed. Ye gods, how am I supposed to distinguish between
these when I target gas' intel syntax? But other than that issue, which
is VERY annoying and should be reverted upstream (i.e. the "older" syntax
should still be accepted), it simply doesn't work!

   * Immediate form long jumps and calls are call/ljmp $SECTION,
     $OFFSET' in AT&T syntax; the Intel syntax is all/jmp far
     SECTION:OFFSET'.  Also, the far return instruction is ret
     $STACK-ADJUST' in AT&T syntax; Intel syntax is et far
     STACK-ADJUST'.

(Intersting side note, the older syntax matched AT&T more closely; this
seems to be a try to get it more close to other Intel syntax assemblers,
which per se isn't a bad thing - or would have been in 1999. Now it's too
late... especially since more recent binutils are GPLv3.)

t...@frozenfish:~ $ cat testmin2.s
        .intel_syntax noprefix
        .text
        .code16
        .globl  _start
_start: jmp far 0xF000:0xFFF0
t...@frozenfish:~ $ as testmin2.s
testmin2.s: Assembler messages:
testmin2.s:5: Error: junk F000:0xFFF0' after expression

So there isn't even a way to do a JMP FAR here. (Apologies if my editor
stripped U+0060 while pasting, it's a command character and shouldn't
be used in any strings ever. Ask Markus Kuhn...)

I invoke the "I didn't do anything! (I didn't even do anything before!)"
because the aforementioned assembly source compiles fine using other ver-
sions of gas. I would like to get this fixed, as grml depends on it; it
may or may not be a bug you'd want to forward upstream.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.18-6-686 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
(would be mksh, but #540512 currently prevents that...)

Versions of packages binutils depends on:
ii  libc6                  2.9-24            GNU C Library: Shared libraries
ii  zlib1g                 1:1.2.3.3.dfsg-15 compression library - runtime

binutils recommends no packages.

Versions of packages binutils suggests:
ii  binutils-doc          2.19.51.20090805-1 Documentation for the GNU assemble

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to