mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-23 18:14:13 +08:00
* ldcref.c (struct cref_hash_entry): Make "demangled" const.
(cref_fill_array): Adjust for changed demangler. * ldlang.c (lang_one_common): Likewise.
This commit is contained in:
parent
e74ecdb3cb
commit
d7d4c8debe
@ -1,3 +1,9 @@
|
||||
2007-04-28 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* ldcref.c (struct cref_hash_entry): Make "demangled" const.
|
||||
(cref_fill_array): Adjust for changed demangler.
|
||||
* ldlang.c (lang_one_common): Likewise.
|
||||
|
||||
2007-04-27 Nathan Froyd <froydnj@codesourcery.com>
|
||||
|
||||
* emulparams/elf32_sparc.sh: Update comments.
|
||||
|
@ -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;
|
||||
|
||||
|
14
ld/ldlang.c
14
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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user