This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] more adjustments to elf_find_function
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Jan Beulich <JBeulich at novell dot com>
- Cc: nickc at redhat dot com, binutils at sources dot redhat dot com
- Date: Thu, 2 Dec 2004 08:41:23 +1030
- Subject: Re: [PATCH] more adjustments to elf_find_function
- References: <s1ad7c30.015@emea1-mh.id2.novell.com>
On Wed, Dec 01, 2004 at 09:09:37AM +0100, Jan Beulich wrote:
> they would just introduce a little more overhead.
That's one reason why I disagree with the patch.
The others are:
- you obviously cannot reliably choose the right filename for global
symbols if there is more than one file symbol.
- for local symbols, your code relies on ld -r continuing to leave file
symbols unsorted, which I see as a minor violation of the ELF spec.
Unnecessary, useless code doesn't help maintainability. Granted, this
instance isn't serious; I'm just objecting on principle. If you
commented the code with
/* ??? Given multiple file symbols, it is impossible to reliably
choose the right file name for global symbols. File symbols are
local symbols, and thus all file symbols must sort before any
global symbols. The ELF spec says that a file symbol must sort
before other local symbols, but currently ld -r doesn't do this.
So, for ld -r output, it is possible to make a better choice of
file name for local symbols by ignoring file symbols appearing
after a given local symbol. */
then given that Nick has already okayed the patch, I'd withdraw my
objections.
--
Alan Modra
IBM OzLabs - Linux Technology Centre