Re: Wanted: A decent assembler

Maciej W. Rozycki (macro@ds2.pg.gda.pl)
Wed, 23 Apr 2003 15:57:30 +0200 (MET DST)


On Wed, 23 Apr 2003, Chuck Ebbert wrote:

> "The result of an expression must be an absolute number, or else an
> offset into a particular section. If an expression is not absolute,
> and there is not enough information when `as' sees the expression to
> know its section, a second pass over the source program might be
> necessary to interpret the expression--but the second pass is currently
> not implemented. `as' aborts with an error message in this situation."

But:

`-'
"Subtraction". If the right argument is absolute, the result
has the section of the left argument. If both arguments are
in the same section, the result is absolute. You may not
subtract arguments from different sections.

> 1: pushl $vector-256 # 5-byte instruction
> jmp common_interrupt # 2 or 5 bytes (8 or 32-bit offset)
> 2:
> if 2b-1b > 8 # <============================= ERROR
> irq_align=16 # switch to 16-byte alignment
> endif

This is a bug in gas. Please check if it is reproducible with the latest
release (2.13.2.1) and if so, then file a bug report to
<bug-binutils@gnu.org>.

Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/