aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2007-04-28 06:04:28 +0000
committerAlan Modra <amodra@gmail.com>2007-04-28 06:04:28 +0000
commitd7d4c8debeaced278c18126aa602c1ce62827f05 (patch)
tree16c8ecdac74a45130c8b0d3e4cf5c69b548fdcde /ld/ldlang.c
parente74ecdb3cb712d0455757d4cdd8dc956c132c837 (diff)
downloadgdb-d7d4c8debeaced278c18126aa602c1ce62827f05.zip
gdb-d7d4c8debeaced278c18126aa602c1ce62827f05.tar.gz
gdb-d7d4c8debeaced278c18126aa602c1ce62827f05.tar.bz2
* ldcref.c (struct cref_hash_entry): Make "demangled" const.
(cref_fill_array): Adjust for changed demangler. * ldlang.c (lang_one_common): Likewise.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r--ld/ldlang.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 92cb77d..116f2e5 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -5269,9 +5269,17 @@ lang_one_common (struct bfd_link_hash_entry *h, void *info)
name = bfd_demangle (output_bfd, h->root.string,
DMGL_ANSI | DMGL_PARAMS);
- minfo ("%s", name);
- len = strlen (name);
- free (name);
+ if (name == NULL)
+ {
+ minfo ("%s", h->root.string);
+ len = strlen (h->root.string);
+ }
+ else
+ {
+ minfo ("%s", name);
+ len = strlen (name);
+ free (name);
+ }
if (len >= 19)
{