This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: test case: m68k symbol bug!
- To: Nick Papadonis <npapadon at yahoo dot com>
- Subject: Re: test case: m68k symbol bug!
- From: Alan Modra <alan at linuxcare dot com dot au>
- Date: Sun, 25 Mar 2001 23:53:12 +1000 (EST)
- cc: binutils at sources dot redhat dot com
On 22 Mar 2001, Nick Papadonis wrote:
> Here we go. First off lets review the 'as' info node:
> --- SNIP ---
> A symbol can be given an arbitrary value by writing a symbol,
> followed by an equals sign `=', followed by an expression (*note
> Expressions::). This is equivalent to using the `.set' directive.
> *Note `.set': Set.
> --- SNIP ---
>
> Translation: set and = should do the same thing.
Um yes, but as.info is not a definitive document by any means.
Translation: gas behaviour may differ from the info node.
> If .set and = do the same thing, why are they resulting in different
> symbol tables?
Because gas/read.c:s_set, the function that handles a .set pseudo op, has
the following, which is lacking from gas/read.c:equals:
#ifdef OBJ_COFF
/* "set" symbols are local unless otherwise specified. */
SF_SET_LOCAL (symbolP);
#endif /* OBJ_COFF */
I don't know enough about coff assemblers to know whether this was
intentionally left out of the `equals' code (and the gas documentation
needs fixing), or whether you've discovered a bug.
Alan Modra
--
Linuxcare