[PATCH] make elf_find_function capable of reporting a file name
Jan Beulich
JBeulich@novell.com
Wed Oct 6 08:23:00 GMT 2004
Realizing that elf_find_function never reported a file name, I found
that
it had an ill (wrong for file symbols, redundant for others) check for
matching the target section.
Build and tested on i686-pc-linux-gnu.
bfd/
2004-10-06 Jan Beulich <jbeulich@novell.com>
* elf.c (elf_find_function): Don't generally check for matching
section, just for non-file symbols. Remove redunant comparison
for the latter.
---
/home/jbeulich/src/binutils/mainline/2004-10-06.09.37/bfd/elf.c 2004-10-06
09:35:46.000000000 +0200
+++ 2004-10-06.09.37/bfd/elf.c 2004-10-06 10:12:57.415232480 +0200
@@ -6304,9 +6304,6 @@ elf_find_function (bfd *abfd ATTRIBUTE_U
q = (elf_symbol_type *) *p;
- if (bfd_get_section (&q->symbol) != section)
- continue;
-
switch (ELF_ST_TYPE (q->internal_elf_sym.st_info))
{
default:
@@ -6316,7 +6313,7 @@ elf_find_function (bfd *abfd ATTRIBUTE_U
break;
case STT_NOTYPE:
case STT_FUNC:
- if (q->symbol.section == section
+ if (bfd_get_section (&q->symbol) == section
&& q->symbol.value >= low_func
&& q->symbol.value <= offset)
{
-------------- next part --------------
A non-text attachment was scrubbed...
Name: binutils-mainline-elf-find-function.patch
Type: application/octet-stream
Size: 1105 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20041006/4a83075e/attachment.obj>
More information about the Binutils
mailing list