This is the mail archive of the 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: [PATCH] more adjustments to elf_find_function

Hi Jan,

2004-11-30 Jan Beulich  <>

	* 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
	be ambiguous/wrong.

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 elf32-arm.c.

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 ?


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