Subject: Re: your mail
To: None <cato@df.lth.se, tech-toolchain@netbsd.org, port-i386@netbsd.org>
From: Olaf Seibert <rhialto@polder.ubc.kun.nl>
List: tech-toolchain
Date: 12/29/1998 15:54:22
Krister Walfridsson <cato@df.lth.se> wrote:
>The problem is that the old assembler doesn't handle this! It just
>silently goes on, generating bogus output. But it is correct for
>this case! (and it is too big a bug to be "bug compatible" with... :-)
>
>You can try this by assembling the two following files
>
>   reloc=0x80000
>      .text
>   kwa:
>      .word   0x2323
>      .word   kwa-reloc
>
>and
>
>      .text
>   kwa:
>      .word   0x2323
>      .word   kwa-0
>
>and compare the result. They are identical! What is happening is that
>the old gas silently truncates 'reloc' to 16 bits.

I would say that if somebody wrote a .word directive, and the value does
not fit into a word, then truncation is the logical thing to do.

>So rejecting your code is not a bug in gas.new...

I warning might be in order, but I'd say outright rejection is overdoing
it.

>   /Krister
-Olaf.
--
___ Olaf 'Rhialto' Seibert - rhialto@polder.ubc. ---- Unauthorized duplication,
\X/ .kun.nl ---- while sometimes necessary, is never as good as the real thing.