* 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:
Ian Lance Taylor
1996-04-26 22:15:10 +00:00
parent ecba7a3a1a
commit efa6c49704
7 changed files with 517 additions and 254 deletions

View File

@@ -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;
}