[MIPS] Add Loongson 2K1000 proccessor support.
[deliverable/binutils-gdb.git] / binutils / addr2line.c
index d37145e9e53a39c48b2fc55631385aa9712f8bcf..64454f54b9cad9dd873e187d20e8fb7f741a2365 100644 (file)
@@ -1,5 +1,5 @@
 /* addr2line.c -- convert addresses to line number and function name
-   Copyright (C) 1997-2015 Free Software Foundation, Inc.
+   Copyright (C) 1997-2018 Free Software Foundation, Inc.
    Contributed by Ulrich Lauther <Ulrich.Lauther@mchp.siemens.de>
 
    This file is part of GNU Binutils.
@@ -140,6 +140,14 @@ slurp_symtab (bfd *abfd)
       syms = xmalloc (storage);
       symcount = bfd_canonicalize_dynamic_symtab (abfd, syms);
     }
+
+  /* PR 17512: file: 2a1d3b5b.
+     Do not pretend that we have some symbols when we don't.  */
+  if (symcount <= 0)
+    {
+      free (syms);
+      syms = NULL;
+    }
 }
 \f
 /* These global variables are used to pass information between
This page took 0.02371 seconds and 4 git commands to generate.