aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2005-12-27 09:22:59 +0000
committerAlan Modra <amodra@gmail.com>2005-12-27 09:22:59 +0000
commita192385803b3acc7636dcfb46f6c2cc0cca8201e (patch)
tree497d621e60c0a47fce762597a65561989c66a98c /bfd/elf.c
parent70949bf12c3309d6c2d38628c6a249f6dd395fd9 (diff)
downloadgdb-a192385803b3acc7636dcfb46f6c2cc0cca8201e.zip
gdb-a192385803b3acc7636dcfb46f6c2cc0cca8201e.tar.gz
gdb-a192385803b3acc7636dcfb46f6c2cc0cca8201e.tar.bz2
* elf.c (elf_find_function): Don't ignore section syms.
Simplify filename logic.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c12
1 files changed, 4 insertions, 8 deletions
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;