DEFUN(print_alignment,(value),
unsigned int value)
{
- printf("2**%2u",value);
+ printf("2**%1u",value);
}
static void
DEFUN(print_fill,(value),
{
lang_memory_region_type *m;
fprintf(outfile,"**MEMORY CONFIGURATION**\n\n");
-
+#ifdef HOST_64_BIT
fprintf(outfile,"name\t\torigin\t\tlength\t\tattributes\n");
+#else
+ fprintf(outfile,"name\t\torigin length\t\tattributes\n");
+#endif
for (m = lang_memory_region_list;
m != (lang_memory_region_type *)NULL;
m = m->next)
fprintf(outfile,"\n");
}
fprintf(outfile,"\n\n**LINK EDITOR MEMORY MAP**\n\n");
- fprintf(outfile,"output\t\tinput\t\tvirtual\n");
- fprintf(outfile,"section\t\tsection\t\taddress\tsize\n\n");
+ fprintf(outfile,"output input virtual\n");
+ fprintf(outfile,"section section address tsize\n\n");
print_statements();
lang_output_section_statement_lookup
(s->address_statement.section_name);
os->addr_tree = s->address_statement.address;
+ if (os->bfd_section == (asection *)NULL) {
+ info("%P%F can't set the address of undefined section %s\n",
+ s->address_statement.section_name);
+ }
}
break;
case lang_input_statement_enum:
else {
printf("%s", abfd->filename);
}
- printf("(%d bytes)", (int)bfd_alloc_size(abfd));
+ printf("(overhead %d bytes)", (int)bfd_alloc_size(abfd));
print_nl();
/* Find all the symbols in this file defined in this section */
lang_wild_statement_type *w AND
lang_output_section_statement_type *os)
{
+ printf(" from ");
if (w->filename != (char *)NULL) {
printf("%s",w->filename);
}
print_file_stuff(f)
lang_input_statement_type *f;
{
- fprintf (stdout, " %s", f->filename);
- fprintf (stdout, " ");
+ fprintf (stdout, " %s\n", f->filename);
if (f->just_syms_flag)
- {
- fprintf (stdout, " symbols only\n");
- }
+ {
+ fprintf (stdout, " symbols only\n");
+ }
else
- {
- asection *s;
- if (true || option_longmap) {
- for (s = f->the_bfd->sections;
- s != (asection *)NULL;
- s = s->next) {
- print_address(s->output_offset);
- printf ( "%08x 2**%2ud %s\n",
- (unsigned)s->size, s->alignment_power, s->name);
+ {
+ asection *s;
+ if (true || option_longmap) {
+ for (s = f->the_bfd->sections;
+ s != (asection *)NULL;
+ s = s->next) {
+ print_address(s->output_offset);
+ printf (" %08x 2**%2ud %s\n",
+ (unsigned)s->size, s->alignment_power, s->name);
+ }
}
- }
- else {
- for (s = f->the_bfd->sections;
- s != (asection *)NULL;
- s = s->next) {
- printf("%s ", s->name);
- print_address(s->output_offset);
- printf("(%x)", (unsigned)s->size);
+ else {
+ for (s = f->the_bfd->sections;
+ s != (asection *)NULL;
+ s = s->next) {
+ printf("%s ", s->name);
+ print_address(s->output_offset);
+ printf("(%x)", (unsigned)s->size);
+ }
+ printf("hex \n");
}
- printf("hex \n");
}
- }
+ fprintf (stdout, "\n");
}
void
ldsym_print_symbol_table ()
{
- fprintf (stdout, "\nFiles:\n\n");
+ fprintf (stdout, "**FILES**\n\n");
lang_for_each_file(print_file_stuff);
- fprintf (stdout, "\nGlobal symbols:\n\n");
+ fprintf(stdout, "**GLOBAL SYMBOLS**\n\n");
+ fprintf(stdout, "offset section offset symbol\n");
{
register ldsym_type *sp;
print_address(defsym->value);
if (defsec)
{
- print_space();
- print_address(defsym->value+defsec->vma);
- printf("%7s",
+ printf(" %-10s",
bfd_section_name(output_bfd,
defsec));
+ print_space();
+ print_address(defsym->value+defsec->vma);
}
else
}
}
- else {
- printf("undefined");
- }
if (sp->scoms_chain) {
- printf(" common size ");
+ printf("common ");
print_address((*(sp->scoms_chain))->value);
- printf("%s ",sp->name);
+ printf(" %s ",sp->name);
}
- if (sp->sdefs_chain) {
- printf(" symbol def ");
- print_address((*(sp->sdefs_chain))->value);
- printf("%s ",sp->name);
+ else if (sp->sdefs_chain) {
+ printf(" %s ",sp->name);
}
else {
- printf(" undefined ");
+ printf("undefined ");
printf("%s ",sp->name);
}
print_nl();