aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--binutils/ChangeLog6
-rw-r--r--binutils/nm.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 0eba844..ad4f226 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2019-02-11 Nick Clifton <nickc@redhat.com>
+
+ PR 24168
+ * nm.c (print_symbol): Check for NULL contents of the sym_ptr_ptr
+ field.
+
2018-03-19 H.J. Lu <hongjiu.lu@intel.com>
Backport from master branch
diff --git a/binutils/nm.c b/binutils/nm.c
index e46fffc..afaea56 100644
--- a/binutils/nm.c
+++ b/binutils/nm.c
@@ -976,6 +976,7 @@ print_symbol (bfd * abfd,
}
symname = bfd_asymbol_name (sym);
+
for (i = 0; i < seccount; i++)
{
long j;
@@ -985,7 +986,9 @@ print_symbol (bfd * abfd,
arelent *r;
r = relocs[i][j];
+
if (r->sym_ptr_ptr != NULL
+ && * r->sym_ptr_ptr != NULL
&& (*r->sym_ptr_ptr)->section == sym->section
&& (*r->sym_ptr_ptr)->value == sym->value
&& strcmp (symname,