* elf.c (elf_find_function): Fail if not provided with a symbol
authorNick Clifton <nickc@redhat.com>
Thu, 16 Jun 2011 12:34:19 +0000 (12:34 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 16 Jun 2011 12:34:19 +0000 (12:34 +0000)
table.

bfd/ChangeLog
bfd/elf.c

index 2489eda2de96d3c97a71e614707e0581a26fcad3..fd2c5d89fcaddf11ac5ad81c552d1f94bde109be 100644 (file)
@@ -1,3 +1,8 @@
+2011-06-16  Nick Clifton  <nickc@redhat.com>
+
+       * elf.c (elf_find_function): Fail if not provided with a symbol
+       table.
+
 2011-06-15  Ulrich Weigand  <ulrich.weigand@linaro.org>
 
        * elf-bfd.h (elfcore_write_arm_vfp): Add prototype.
index 15e0cd34f69eba57734d9c6549b94402d99d66ee..15e9087c801f703f392ac0f2534e9a81f6198cbb 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -7391,6 +7391,9 @@ elf_find_function (bfd *abfd,
   enum { nothing_seen, symbol_seen, file_after_symbol_seen } state;
   const struct elf_backend_data *bed = get_elf_backend_data (abfd);
 
+  if (symbols == NULL)
+    return FALSE;
+
   filename = NULL;
   func = NULL;
   file = NULL;