Broken Code in gas/symbols.c

Alan Modra amodra@bigpond.net.au
Thu Sep 30 15:02:00 GMT 2004


On Thu, Sep 30, 2004 at 07:27:40PM +0530, Ravi wrote:
> Now local_symbol_convert creates a 'struct symbol' from a 'struct 
> local_symbol' by doing a malloc. Since the function takes the pointer to 
> a 'struct symbol', the newly created 'struct local symbol' does not get 
> returned to the calling function.

You are not describing local_symbol_convert accurately.  When converted,
your original "struct local_symbol" is modified to contain a pointer to
the newly malloc'd "struct symbol".  I don't think there is any need to
modify any of the functions in gas/symbols.c.  More likely, you have hit
some code that accesses the fields of "struct symbol" directly rather
than going via accessor functions like symbol_get_bfdsym().

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list