This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] more adjustments to elf_find_function
- From: Nick Clifton <nickc at redhat dot com>
- To: Jan Beulich <JBeulich at novell dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Tue, 30 Nov 2004 16:02:46 +0000
- Subject: Re: [PATCH] more adjustments to elf_find_function
- References: <firstname.lastname@example.org>
2004-11-30 Jan Beulich <email@example.com>
* elf.c (elf_find_function): Don't use the last file symbol
seen, but the last one seen prior to the symbol being reported.
Don't report a filename at all for global symbols when that
I am not sure that this patch is quite right. There are two possible
problems with it:
1) It does not apply the same adjustment to arm_elf_find_function in
2) I think that the transition from state==nothing_seen to
state==symbol_seen might be in the wrong place. What happens if the
symbols encountered are in this order:
The first symbol will change the state to symbol_seen, but will not set
'func'. The second symbol will change the state to
file_after_symbol_seen so that when the third symbol is encountered
'filename' will be set to NULL and no filename will be reported.
I think that the change from state nothing_seen to state symbol_seen
ought to be inside the switch() statement, at the end of STT_FUNC. What
do you think ?