test case: m68k symbol bug!
Alan Modra
alan@linuxcare.com.au
Sun Mar 25 05:53:00 GMT 2001
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
More information about the Binutils
mailing list