* ldlang.c (wild): Tidy default_common_section loop.
(print_input_section): Format.
This commit is contained in:
parent
241a6c40c8
commit
abe6ac950c
2 changed files with 49 additions and 51 deletions
|
@ -1,5 +1,8 @@
|
||||||
2006-04-19 Alan Modra <amodra@bigpond.net.au>
|
2006-04-19 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* ldlang.c (wild): Tidy default_common_section loop.
|
||||||
|
(print_input_section): Format.
|
||||||
|
|
||||||
* configure: Regenerate.
|
* configure: Regenerate.
|
||||||
|
|
||||||
2006-04-16 Daniel Jacobowitz <dan@codesourcery.com>
|
2006-04-16 Daniel Jacobowitz <dan@codesourcery.com>
|
||||||
|
|
97
ld/ldlang.c
97
ld/ldlang.c
|
@ -2458,17 +2458,15 @@ wild (lang_wild_statement_type *s,
|
||||||
|
|
||||||
walk_wild (s, output_section_callback, output);
|
walk_wild (s, output_section_callback, output);
|
||||||
|
|
||||||
for (sec = s->section_list; sec != NULL; sec = sec->next)
|
if (default_common_section == NULL)
|
||||||
{
|
for (sec = s->section_list; sec != NULL; sec = sec->next)
|
||||||
if (default_common_section != NULL)
|
|
||||||
break;
|
|
||||||
if (sec->spec.name != NULL && strcmp (sec->spec.name, "COMMON") == 0)
|
if (sec->spec.name != NULL && strcmp (sec->spec.name, "COMMON") == 0)
|
||||||
{
|
{
|
||||||
/* Remember the section that common is going to in case we
|
/* Remember the section that common is going to in case we
|
||||||
later get something which doesn't know where to put it. */
|
later get something which doesn't know where to put it. */
|
||||||
default_common_section = output;
|
default_common_section = output;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return TRUE iff target is the sought target. */
|
/* Return TRUE iff target is the sought target. */
|
||||||
|
@ -3509,64 +3507,61 @@ static void
|
||||||
print_input_section (asection *i)
|
print_input_section (asection *i)
|
||||||
{
|
{
|
||||||
bfd_size_type size = i->size;
|
bfd_size_type size = i->size;
|
||||||
|
int len;
|
||||||
|
bfd_vma addr;
|
||||||
|
|
||||||
init_opb ();
|
init_opb ();
|
||||||
|
|
||||||
|
print_space ();
|
||||||
|
minfo ("%s", i->name);
|
||||||
|
|
||||||
|
len = 1 + strlen (i->name);
|
||||||
|
if (len >= SECTION_NAME_MAP_LENGTH - 1)
|
||||||
|
{
|
||||||
|
print_nl ();
|
||||||
|
len = 0;
|
||||||
|
}
|
||||||
|
while (len < SECTION_NAME_MAP_LENGTH)
|
||||||
{
|
{
|
||||||
int len;
|
|
||||||
bfd_vma addr;
|
|
||||||
|
|
||||||
print_space ();
|
print_space ();
|
||||||
minfo ("%s", i->name);
|
++len;
|
||||||
|
}
|
||||||
|
|
||||||
len = 1 + strlen (i->name);
|
if (i->output_section != NULL && i->output_section->owner == output_bfd)
|
||||||
if (len >= SECTION_NAME_MAP_LENGTH - 1)
|
addr = i->output_section->vma + i->output_offset;
|
||||||
{
|
else
|
||||||
print_nl ();
|
{
|
||||||
len = 0;
|
addr = print_dot;
|
||||||
}
|
size = 0;
|
||||||
while (len < SECTION_NAME_MAP_LENGTH)
|
}
|
||||||
|
|
||||||
|
minfo ("0x%V %W %B\n", addr, TO_ADDR (size), i->owner);
|
||||||
|
|
||||||
|
if (size != i->rawsize && i->rawsize != 0)
|
||||||
|
{
|
||||||
|
len = SECTION_NAME_MAP_LENGTH + 3;
|
||||||
|
#ifdef BFD64
|
||||||
|
len += 16;
|
||||||
|
#else
|
||||||
|
len += 8;
|
||||||
|
#endif
|
||||||
|
while (len > 0)
|
||||||
{
|
{
|
||||||
print_space ();
|
print_space ();
|
||||||
++len;
|
--len;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i->output_section != NULL && i->output_section->owner == output_bfd)
|
minfo (_("%W (size before relaxing)\n"), i->rawsize);
|
||||||
addr = i->output_section->vma + i->output_offset;
|
}
|
||||||
|
|
||||||
|
if (i->output_section != NULL && i->output_section->owner == output_bfd)
|
||||||
|
{
|
||||||
|
if (command_line.reduce_memory_overheads)
|
||||||
|
bfd_link_hash_traverse (link_info.hash, print_one_symbol, i);
|
||||||
else
|
else
|
||||||
{
|
print_all_symbols (i);
|
||||||
addr = print_dot;
|
|
||||||
size = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
minfo ("0x%V %W %B\n", addr, TO_ADDR (size), i->owner);
|
print_dot = addr + TO_ADDR (size);
|
||||||
|
|
||||||
if (size != i->rawsize && i->rawsize != 0)
|
|
||||||
{
|
|
||||||
len = SECTION_NAME_MAP_LENGTH + 3;
|
|
||||||
#ifdef BFD64
|
|
||||||
len += 16;
|
|
||||||
#else
|
|
||||||
len += 8;
|
|
||||||
#endif
|
|
||||||
while (len > 0)
|
|
||||||
{
|
|
||||||
print_space ();
|
|
||||||
--len;
|
|
||||||
}
|
|
||||||
|
|
||||||
minfo (_("%W (size before relaxing)\n"), i->rawsize);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (i->output_section != NULL && i->output_section->owner == output_bfd)
|
|
||||||
{
|
|
||||||
if (command_line.reduce_memory_overheads)
|
|
||||||
bfd_link_hash_traverse (link_info.hash, print_one_symbol, i);
|
|
||||||
else
|
|
||||||
print_all_symbols (i);
|
|
||||||
|
|
||||||
print_dot = addr + TO_ADDR (size);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue