]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
PR binutils/15106
authorAlan Modra <amodra@gmail.com>
Thu, 7 Feb 2013 04:21:35 +0000 (04:21 +0000)
committerAlan Modra <amodra@gmail.com>
Thu, 7 Feb 2013 04:21:35 +0000 (04:21 +0000)
* elf.c (elf_find_function): Don't cache if symbols change.

bfd/ChangeLog
bfd/elf.c

index 1002477ad48b20922aaabc7f888f74d81e861440..8014de5005d9c26d270e126fc0927ab3d29d40be 100644 (file)
@@ -1,3 +1,8 @@
+2013-02-07  Roberto Agostino Vitillo  <ra.vitillo@gmail.com>
+
+       PR binutils/15106
+       * elf.c (elf_find_function): Don't cache if symbols change.
+
 2013-02-07  Alan Modra  <amodra@gmail.com>
 
        PR binutils/14873
index 9b8e3e29d137d333cc45f17015c6885b4c3990bd..d08a45d24678794f314c3b6cea0a8ad96c51f2a7 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -7485,6 +7485,7 @@ elf_find_function (bfd *abfd,
                   const char **functionname_ptr)
 {
   static asection *last_section;
+  static asymbol **last_symbols;
   static asymbol *func;
   static const char *filename;
   static bfd_size_type func_size;
@@ -7493,6 +7494,7 @@ elf_find_function (bfd *abfd,
     return FALSE;
 
   if (last_section != section
+      || last_symbols != symbols
       || func == NULL
       || offset < func->value
       || offset >= func->value + func_size)
@@ -7518,6 +7520,7 @@ elf_find_function (bfd *abfd,
       state = nothing_seen;
       func_size = 0;
       last_section = section;
+      last_symbols = symbols;
 
       for (p = symbols; *p != NULL; p++)
        {