aboutsummaryrefslogtreecommitdiff
path: root/ld/ldcref.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/ldcref.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/ldcref.c')
-rw-r--r--ld/ldcref.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ld/ldcref.c b/ld/ldcref.c
index 3966bbc..4fa29de 100644
--- a/ld/ldcref.c
+++ b/ld/ldcref.c
@@ -57,7 +57,7 @@ struct cref_ref {
struct cref_hash_entry {
struct bfd_hash_entry root;
/* The demangled name. */
- char *demangled;
+ const char *demangled;
/* References to and definitions of this symbol. */
struct cref_ref *refs;
};
@@ -327,6 +327,8 @@ cref_fill_array (struct cref_hash_entry *h, void *data)
ASSERT (h->demangled == NULL);
h->demangled = bfd_demangle (output_bfd, h->root.string,
DMGL_ANSI | DMGL_PARAMS);
+ if (h->demangled == NULL)
+ h->demangled = h->root.string;
**pph = h;