mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 09:08:59 +00:00
* ldmisc.h (demangle): Declare.
* ldmisc.c: Include "libiberty.h". Include demangle.h with "", not <>. (demangle): Make non-static. Remove remove_underscore paramter. Always return an allocated string. (vfinfo): Free result of demangle. Add case 'G'. Use %T to print functionname, rather than calling demangle. Print a colon between the BFD(section+offset) and the line number. * ldmain.c (add_archive_element): Improve format of archive information in map file. (constructor_callback): Don't print anything to the map file. * ldlang.c (lang_one_common): Improve format of common symbol information in map file. * ldctor.c (ldctor_build_sets): If producing a map file, print set information. * ldwrite.c (print_symbol_table): Print a newline before the header in the map file. * Makefile.in: Rebuild dependencies.
This commit is contained in:
48
ld/ldlang.c
48
ld/ldlang.c
@@ -2592,9 +2592,51 @@ lang_one_common (h, info)
|
||||
section->flags |= SEC_ALLOC;
|
||||
|
||||
if (config.map_file != NULL)
|
||||
fprintf (config.map_file, "Allocating common %s: %lx at %lx %s\n",
|
||||
h->root.string, (unsigned long) size,
|
||||
(unsigned long) h->u.def.value, section->owner->filename);
|
||||
{
|
||||
static boolean header_printed;
|
||||
int len;
|
||||
char *name;
|
||||
char buf[50];
|
||||
|
||||
if (! header_printed)
|
||||
{
|
||||
minfo ("\nAllocating common symbols\n");
|
||||
minfo ("Common symbol size file\n\n");
|
||||
header_printed = true;
|
||||
}
|
||||
|
||||
name = demangle (h->root.string);
|
||||
minfo ("%s", name);
|
||||
len = strlen (name);
|
||||
free (name);
|
||||
|
||||
if (len >= 19)
|
||||
{
|
||||
print_nl ();
|
||||
len = 0;
|
||||
}
|
||||
while (len < 20)
|
||||
{
|
||||
print_space ();
|
||||
++len;
|
||||
}
|
||||
|
||||
minfo ("0x");
|
||||
if (size <= 0xffffffff)
|
||||
sprintf (buf, "%lx", (unsigned long) size);
|
||||
else
|
||||
sprintf_vma (buf, size);
|
||||
minfo ("%s", buf);
|
||||
len = strlen (buf);
|
||||
|
||||
while (len < 16)
|
||||
{
|
||||
print_space ();
|
||||
++len;
|
||||
}
|
||||
|
||||
minfo ("%B\n", section->owner);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user