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: Nick Clifton <nickc at redhat dot com>
- Cc: Jan Beulich <JBeulich at novell dot com>, binutils at sources dot redhat dot com
- Date: Wed, 1 Dec 2004 09:12:37 +1030
- Subject: Re: [PATCH] more adjustments to elf_find_function
- References: <s1aca0a3.060@emea1-mh.id2.novell.com> <41ACA856.9070004@redhat.com>
I think this patch is wrong. If we are generating object files
according to the ELF spec, then any file symbols will come first.
"STT_FILE
Conventionally, the symbol's name gives the name of the source file
associated with the object file. A file symbol has STB_LOCAL
binding, its section index is SHN_ABS, and it precedes the other
STB_LOCAL symbols for the file, if it is present."
ie. any state machine tracking whether symbols are seen before/after a
file symbol is a waste of time. If ld -r is not placing all file
symbols at the start, then that's a bug.
--
Alan Modra
IBM OzLabs - Linux Technology Centre