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.
This commit is contained in:
Steve Chamberlain
1994-01-28 01:26:25 +00:00
parent 98c6bbbe43
commit 804c860185
2 changed files with 29 additions and 29 deletions

View File

@ -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) 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, * ldmain.c ldmain.h ldgram.y: If -v -V or --version was given,

View File

@ -1230,19 +1230,29 @@ print_input_statement (statm)
} }
} }
static void /* Print all the defined symbols for the abfd provided by in the supplied
print_symbol (q) section.
asymbol * q; */
static boolean
print_one_symbol (hash_entry, ptr)
struct bfd_link_hash_entry *hash_entry;
PTR ptr;
{ {
print_section (""); asection * sec = (asection *)ptr;
fprintf (config.map_file, " ");
print_section (""); if (hash_entry->type == bfd_link_hash_defined)
fprintf (config.map_file, " "); {
print_address (outside_symbol_address (q)); if (sec == hash_entry->u.def.section) {
fprintf (config.map_file, " %s", q->name ? q->name : " "); print_section ("");
if (q->flags & BSF_WEAK) fprintf (config.map_file, " ");
fprintf (config.map_file, " *weak*"); print_section ("");
print_nl (); 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 static void
@ -1293,23 +1303,8 @@ print_input_section (in)
fprintf (config.map_file, "(overhead %d bytes)", (int) bfd_alloc_size (abfd)); fprintf (config.map_file, "(overhead %d bytes)", (int) bfd_alloc_size (abfd));
print_nl (); print_nl ();
/* Find all the symbols in this file defined in this section */ /* Print all the symbols */
bfd_link_hash_traverse (link_info.hash, print_one_symbol, (PTR) i);
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);
}
}
}
} }
else else
{ {