aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Chamberlain <sac@cygnus>1994-01-28 01:26:25 +0000
committerSteve Chamberlain <sac@cygnus>1994-01-28 01:26:25 +0000
commit804c860185bcf1f840f346c25a8c5299a55a18be (patch)
treef964e2995351a2cf5e563eed633a181a2529da5e
parent98c6bbbe43cf8e658aa0b300f60da67789cacf56 (diff)
downloadgdb-804c860185bcf1f840f346c25a8c5299a55a18be.zip
gdb-804c860185bcf1f840f346c25a8c5299a55a18be.tar.gz
gdb-804c860185bcf1f840f346c25a8c5299a55a18be.tar.bz2
Thu Jan 27 17:19:54 1994 Steve Chamberlain (sac@jonny.cygnus.com)
* ldlang.c (print_one_symbol, print_input_section): Print global symbols in symbol table again.
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/ldlang.c53
2 files changed, 29 insertions, 29 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index f51ca01..e43ab55 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+Thu Jan 27 17:19:54 1994 Steve Chamberlain (sac@jonny.cygnus.com)
+
+ * ldlang.c (print_one_symbol, print_input_section): Print
+ global symbols in symbol table again.
+
Thu Jan 27 12:35:01 1994 David J. Mackenzie (djm@thepub.cygnus.com)
* ldmain.c ldmain.h ldgram.y: If -v -V or --version was given,
diff --git a/ld/ldlang.c b/ld/ldlang.c
index aacff4b..5b1958f 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -1230,19 +1230,29 @@ print_input_statement (statm)
}
}
-static void
-print_symbol (q)
- asymbol * q;
+/* Print all the defined symbols for the abfd provided by in the supplied
+ section.
+*/
+
+static boolean
+print_one_symbol (hash_entry, ptr)
+struct bfd_link_hash_entry *hash_entry;
+PTR ptr;
{
- print_section ("");
- fprintf (config.map_file, " ");
- print_section ("");
- fprintf (config.map_file, " ");
- print_address (outside_symbol_address (q));
- fprintf (config.map_file, " %s", q->name ? q->name : " ");
- if (q->flags & BSF_WEAK)
- fprintf (config.map_file, " *weak*");
- print_nl ();
+ asection * sec = (asection *)ptr;
+
+ if (hash_entry->type == bfd_link_hash_defined)
+ {
+ if (sec == hash_entry->u.def.section) {
+ print_section ("");
+ fprintf (config.map_file, " ");
+ print_section ("");
+ fprintf (config.map_file, " ");
+ print_address (hash_entry->u.def.value + outside_section_address (sec));
+ fprintf (config.map_file, " %s", hash_entry->root.string);
+ print_nl ();
+ }
+ }
}
static void
@@ -1293,23 +1303,8 @@ print_input_section (in)
fprintf (config.map_file, "(overhead %d bytes)", (int) bfd_alloc_size (abfd));
print_nl ();
- /* Find all the symbols in this file defined in this section */
-
- if (in->ifile->symbol_count)
- {
- asymbol **p;
-
- for (p = in->ifile->asymbols; *p; p++)
- {
- asymbol *q = *p;
-
- if (bfd_get_section (q) == i
- && (q->flags & (BSF_GLOBAL | BSF_WEAK)) != 0)
- {
- print_symbol (q);
- }
- }
- }
+ /* Print all the symbols */
+ bfd_link_hash_traverse (link_info.hash, print_one_symbol, (PTR) i);
}
else
{