This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Broken Code in gas/symbols.c


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]