This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Commit: Fix bug in pdp11's parsing of external symbols
- From: Nick Clifton <nickc at redhat dot com>
- To: binutils at sourceware dot org
- Date: Sun, 15 Feb 2015 15:13:18 +0000
- Subject: Commit: Fix bug in pdp11's parsing of external symbols
- Authentication-results: sourceware.org; auth=none
Hi Guys,
I am applying the patch below to fix I bug introduced to the PDP11
target whilst fixing some security problems. The
aout_get_external_symbols() function should not fail if there are no
symbols. It should just set the count to zero and return
successfully.
Cheers
Nick
bfd/ChangeLog
2015-02-15 Nick Clifton <nickc@redhat.com>
* pdp11.c (aout_get_external_symbols): Return TRUE if there are no
symbols - just set the count to zero.
diff --git a/bfd/pdp11.c b/bfd/pdp11.c
index 420c9c3..0c2bb13 100644
--- a/bfd/pdp11.c
+++ b/bfd/pdp11.c
@@ -1191,7 +1191,12 @@ aout_get_external_symbols (bfd *abfd)
/* PR 17512: file: 011f5a08. */
if (count == 0)
- return FALSE;
+ {
+ obj_aout_external_syms (abfd) = NULL;
+ obj_aout_external_sym_count (abfd) = count;
+ return TRUE;
+ }
+
#ifdef USE_MMAP
if (! bfd_get_file_window (abfd, obj_sym_filepos (abfd),
exec_hdr (abfd)->a_syms,