Subject: Re: NetBSD 'as' old! and broken?
To: Urban Boquist <boquist@cs.chalmers.se>
From: Perry E. Metzger <perry@piermont.com>
List: current-users
Date: 02/25/1997 18:14:52
Urban Boquist writes:
> Has anyone looked at upgrading the NetBSD 'as' to a more recent
> version of GNU gas? I see that the 3RDPARTY file says "Significant
> divergence", so maybe upgrading isn't planned at all?

The problem is that lots of divergence has happened. If someone (hint,
hint) were to take on the project, it would be a Good Thing...

> My reason for asking is that I believe I have found a bug in our as
> that seems fixed in the most recent gas (I've appended a simple demo
> below).
> 
> Unfortunately I can't get the latest GNU gas to coexist with our 'ld'.
> It seems as if ld doesn't understand the relocation info that gas has
> put in, and it complains "relocation address out of range" whenever I
> try to link a file assembled by gas (on NetBSD-current/sparc). If I
> also try the GNU binutils ld I always get "Abort trap"...
> 
> The bug appears on NetBSD/sparc, but from a quick inspection of the as
> expression parser, I'd say that it is probably machine independent.
> The latest GNU gas sources have diverged too much from ours, so my
> attempts at fixing our as have sofar been without success.
> 
> If someone could tell me how I should configure the latest GNU gas to
> be able to use it on NetBSD/sparc, I would very much appreciate it.
> 
> Thanks,
> 	-- Urban
> 
> 
> $ cat simple.s
> .word   L2-L1
> L1:
> .word   L2-L1
> L2:
> 
> $ as -v -al simple.s
> GNU assembler version 1.92.3, NetBSD $Revision: 1.3 $
> SPARC GAS  simple.s                     page 1
> 
>    1 0000 00000000      .word   L2-L1     <------- Wrong!
>    2                    L1:
>    3 0004 00000004      .word   L2-L1
>    4                    L2:
> $ gas -v -al simple.s
> GNU assembler version 2.7 (sparc-unknown-netbsd1.2B), using BFD version 2.7
> SPARC GAS  simple.s                     page 1
> 
>    1 0000 00000004      .word   L2-L1     <------- Correct!
>    2                    L1:
>    3 0004 00000004      .word   L2-L1
>    4                    L2:
> 
> --
> Treasury North Korea $400 million in gold bullion Noriega Delta Force
> Cocaine munitions FSF radar quiche Soviet Clinton colonel BATF
> strategic