- 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);
- }
- }
- }
- else
- {
- for (s = f->the_bfd->sections;
- s != (asection *) NULL;
- s = s->next)
- {
- fprintf (config.map_file, "%s ", s->name);
- print_address (s->output_offset);
- fprintf (config.map_file, "(%x)",
- (unsigned) bfd_get_section_size_after_reloc (s));
- }
- fprintf (config.map_file, "hex \n");
- }
- }
- print_nl ();
-}
-
-/* Print a symbol. */
-
-/*ARGSUSED*/
-static boolean
-print_symbol (p, ignore)
- struct bfd_link_hash_entry *p;
- PTR ignore;
-{
- while (p->type == bfd_link_hash_indirect
- || p->type == bfd_link_hash_warning)
- p = p->u.i.link;
-
- switch (p->type)
- {
- case bfd_link_hash_new:
- abort ();
-
- case bfd_link_hash_undefined:
- fprintf (config.map_file, "undefined ");
- fprintf (config.map_file, "%s ", p->root.string);
- print_nl ();
- break;
-
- case bfd_link_hash_undefweak:
- fprintf (config.map_file, "weak ");
- fprintf (config.map_file, "%s ", p->root.string);
- print_nl ();
- break;
-
- case bfd_link_hash_defined:
- case bfd_link_hash_defweak:
- {
- asection *defsec = p->u.def.section;
-
- print_address (p->u.def.value);
- if (defsec)
- {
- fprintf (config.map_file, " %-10s",
- bfd_section_name (output_bfd, defsec));
- print_space ();
- print_address (p->u.def.value + defsec->vma);
- }
- else
- {
- fprintf (config.map_file, " .......");
- }
- fprintf (config.map_file, " %s", p->root.string);
- if (p->type == bfd_link_hash_defweak)
- fprintf (config.map_file, " [weak]");
- }
- print_nl ();
- break;
-
- case bfd_link_hash_common:
- fprintf (config.map_file, "common ");
- print_address (p->u.c.size);
- fprintf (config.map_file, " %s ", p->root.string);
- print_nl ();
- break;
-
- default:
- abort ();
- }
-
- return true;