aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-04-26 22:15:10 +0000
committerIan Lance Taylor <ian@airs.com>1996-04-26 22:15:10 +0000
commitefa6c49704b5d4a46840c7d93f1312010ad2bae4 (patch)
treee01dc1a4e85f0798e2a695e127744af92f355ff6 /ld/ldlang.c
parentecba7a3a1aa79f341f0b1574e05e634a617247e5 (diff)
downloadgdb-efa6c49704b5d4a46840c7d93f1312010ad2bae4.zip
gdb-efa6c49704b5d4a46840c7d93f1312010ad2bae4.tar.gz
gdb-efa6c49704b5d4a46840c7d93f1312010ad2bae4.tar.bz2
* 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.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r--ld/ldlang.c48
1 files changed, 45 insertions, 3 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c
index f9e0e71..56b588d 100644
--- a/ld/ldlang.c
+++ b/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;
}