* elf.c (elf_find_function): Don't ignore section syms.
authorAlan Modra <amodra@gmail.com>
Tue, 27 Dec 2005 09:22:59 +0000 (09:22 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 27 Dec 2005 09:22:59 +0000 (09:22 +0000)
Simplify filename logic.

bfd/ChangeLog
bfd/elf.c

index 5c58b8107b9dc632973b8ed157b967f402cbf21e..29beee703e0860baddd064e6a2d5bd3b9bb97662 100644 (file)
@@ -1,3 +1,8 @@
+2005-12-27  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf.c (elf_find_function): Don't ignore section syms.
+       Simplify filename logic.
+
 2005-12-27  Alan Modra  <amodra@bigpond.net.au>
 
        * elf32-ppc.c (add_stub_sym): Pass info rather than htab.
index ff433d35068939aadbedfb3bcbcf5dbb94b81a42..5cd921542e0f3ff51fc310cf8014379a64ca2c33 100644 (file)
--- 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;