From a192385803b3acc7636dcfb46f6c2cc0cca8201e Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 27 Dec 2005 09:22:59 +0000 Subject: * elf.c (elf_find_function): Don't ignore section syms. Simplify filename logic. --- bfd/ChangeLog | 5 +++++ bfd/elf.c | 12 ++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'bfd') diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 5c58b81..29beee7 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ 2005-12-27 Alan Modra + * elf.c (elf_find_function): Don't ignore section syms. + Simplify filename logic. + +2005-12-27 Alan Modra + * elf32-ppc.c (add_stub_sym): Pass info rather than htab. Use different names for pic vs non-pic, '.' instead of '_'. (allocate_dynrelocs): Adjust add_stub_sym call. diff --git a/bfd/elf.c b/bfd/elf.c index ff433d3..5cd9215 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -6686,8 +6686,6 @@ elf_find_function (bfd *abfd ATTRIBUTE_UNUSED, if (state == symbol_seen) state = file_after_symbol_seen; continue; - case STT_SECTION: - continue; case STT_NOTYPE: case STT_FUNC: if (bfd_get_section (&q->symbol) == section @@ -6696,12 +6694,10 @@ elf_find_function (bfd *abfd ATTRIBUTE_UNUSED, { func = (asymbol *) q; low_func = q->symbol.value; - if (file == NULL) - filename = NULL; - else if (ELF_ST_BIND (q->internal_elf_sym.st_info) != STB_LOCAL - && state == file_after_symbol_seen) - filename = NULL; - else + filename = NULL; + if (file != NULL + && (ELF_ST_BIND (q->internal_elf_sym.st_info) == STB_LOCAL + || state != file_after_symbol_seen)) filename = bfd_asymbol_name (file); } break; -- cgit v1.1