- einfo ("%F%P: final link failed: %E\n", output_bfd);
- else
- xexit(1);
- }
-
- if (config.map_file)
- {
- print_symbol_table ();
- lang_map ();
- }
-}
-
-/* Print the symbol table. */
-
-static void
-print_symbol_table ()
-{
- fprintf (config.map_file, "**FILES**\n\n");
- lang_for_each_file (print_file_stuff);
-
- fprintf (config.map_file, "**GLOBAL SYMBOLS**\n\n");
- fprintf (config.map_file, "offset section offset symbol\n");
- bfd_link_hash_traverse (link_info.hash, print_symbol, (PTR) NULL);
-}
-
-/* Print information about a file. */
-
-static void
-print_file_stuff (f)
- lang_input_statement_type *f;
-{
- fprintf (config.map_file, " %s\n", f->filename);
- if (f->just_syms_flag)
- {
- fprintf (config.map_file, " symbols only\n");
- }
- else
- {
- asection *s;
- if (true)
- {
- for (s = f->the_bfd->sections;
- s != (asection *) NULL;
- s = s->next)
- {
-#ifdef WINDOWS_NT
- /* Don't include any information that goes into the '.junk'
- section. This includes the code view .debug$ data and
- stuff from .drectve sections */
- if (strcmp (s->name, ".drectve") == 0 ||
- strncmp (s->name, ".debug$", 7) == 0)
- continue;
-#endif
- print_address (s->output_offset);
- if (s->reloc_done)
- {
- fprintf (config.map_file, " %08x 2**%2ud %s\n",
- (unsigned) bfd_get_section_size_after_reloc (s),
- s->alignment_power, s->name);
- }
-
- else
- {
- fprintf (config.map_file, " %08x 2**%2ud %s\n",
- (unsigned) bfd_get_section_size_before_reloc (s),
- s->alignment_power, s->name);
- }
- }
- }