summaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2013-02-07 04:20:31 +0000
committerAlan Modra <amodra@bigpond.net.au>2013-02-07 04:20:31 +0000
commiteabf5455b8424361dc9b3799b02311e7b48acb7d (patch)
tree6f5c52004a2abcd638eaef7f5ddb7362561b9820 /bfd/elf.c
parent60ae86f47a1e9b6d8295c7286addc1c26ff0a192 (diff)
downloadbinutils-redhat-eabf5455b8424361dc9b3799b02311e7b48acb7d.tar.gz
PR binutils/15106
* elf.c (elf_find_function): Don't cache if symbols change.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 7ab3683dc7..9d6ff31892 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -7505,6 +7505,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;
@@ -7513,6 +7514,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)
@@ -7538,6 +7540,7 @@ elf_find_function (bfd *abfd,
state = nothing_seen;
func_size = 0;
last_section = section;
+ last_symbols = symbols;
for (p = symbols; *p != NULL; p++)
{