This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Broken Code in gas/symbols.c
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Ravi <ravi at codito dot com>
- Cc: binutils at sources dot redhat dot com, ramana dot radhakrishnan at codito dot com
- Date: Fri, 1 Oct 2004 00:32:54 +0930
- Subject: Re: Broken Code in gas/symbols.c
- References: <415C10D4.3000409@codito.com>
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