This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Commit: elf_find_function: Fail if not provided with a symbol table.

Hi Guys,

  I am checking in the patch below to fix a bug reported on the Fedora
  Bugzilla system:

  The problem was that addr2line was being invoked on a file that did
  not contain a symbol table, but the code in elf_find_function was
  assuming that a symbol table was present.


2011-06-16  Nick Clifton  <>

	* elf.c (elf_find_function): Fail if not provided with a symbol

Index: bfd/elf.c
RCS file: /cvs/src/src/bfd/elf.c,v
retrieving revision 1.540
diff -u -3 -p -r1.540 elf.c
--- bfd/elf.c	15 Jun 2011 16:36:56 -0000	1.540
+++ bfd/elf.c	16 Jun 2011 12:33:35 -0000
@@ -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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]