This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Commit: elf_find_function: Fail if not provided with a symbol table.
- From: Nick Clifton <nickc at redhat dot com>
- To: binutils at sourceware dot org
- Date: Thu, 16 Jun 2011 13:36:38 +0100
- Subject: 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:
https://bugzilla.redhat.com/show_bug.cgi?id=713471
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.
Cheers
Nick
bfd/ChangeLog
2011-06-16 Nick Clifton <nickc@redhat.com>
* elf.c (elf_find_function): Fail if not provided with a symbol
table.
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;