forked from Imagelibrary/binutils-gdb
* ldlang.c: Formatting.
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2006-07-26 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* ldlang.c: Formatting.
|
||||
|
||||
2006-07-25 Bob Wilson <bob.wilson@acm.org>
|
||||
|
||||
* emultempl/xtensaelf.em (xtensa_strip_inconsistent_linkonce_sections):
|
||||
|
||||
51
ld/ldlang.c
51
ld/ldlang.c
@@ -371,19 +371,19 @@ compare_section (sort_type sort, asection *asec, asection *bsec)
|
||||
|
||||
static lang_section_bst_type **
|
||||
wild_sort_fast (lang_wild_statement_type *wild,
|
||||
struct wildcard_list *sec,
|
||||
lang_input_statement_type *file ATTRIBUTE_UNUSED,
|
||||
asection *section)
|
||||
struct wildcard_list *sec,
|
||||
lang_input_statement_type *file ATTRIBUTE_UNUSED,
|
||||
asection *section)
|
||||
{
|
||||
lang_section_bst_type **tree
|
||||
= (lang_section_bst_type **) (&(wild->handler_data[1]));
|
||||
lang_section_bst_type **tree;
|
||||
|
||||
tree = (lang_section_bst_type **) &wild->handler_data[1];
|
||||
if (!wild->filenames_sorted
|
||||
&& (sec == NULL || sec->spec.sorted == none))
|
||||
{
|
||||
/* Append at the right end of tree. */
|
||||
while (*tree)
|
||||
tree = &((*tree)->right);
|
||||
tree = &((*tree)->right);
|
||||
return tree;
|
||||
}
|
||||
|
||||
@@ -391,9 +391,9 @@ wild_sort_fast (lang_wild_statement_type *wild,
|
||||
{
|
||||
/* Find the correct node to append this section. */
|
||||
if (compare_section (sec->spec.sorted, section, (*tree)->section) < 0)
|
||||
tree = &((*tree)->left);
|
||||
tree = &((*tree)->left);
|
||||
else
|
||||
tree = &((*tree)->right);
|
||||
tree = &((*tree)->right);
|
||||
}
|
||||
|
||||
return tree;
|
||||
@@ -403,10 +403,10 @@ wild_sort_fast (lang_wild_statement_type *wild,
|
||||
|
||||
static void
|
||||
output_section_callback_fast (lang_wild_statement_type *ptr,
|
||||
struct wildcard_list *sec,
|
||||
asection *section,
|
||||
lang_input_statement_type *file,
|
||||
void *output ATTRIBUTE_UNUSED)
|
||||
struct wildcard_list *sec,
|
||||
asection *section,
|
||||
lang_input_statement_type *file,
|
||||
void *output ATTRIBUTE_UNUSED)
|
||||
{
|
||||
lang_section_bst_type *node;
|
||||
lang_section_bst_type **tree;
|
||||
@@ -428,14 +428,14 @@ output_section_callback_fast (lang_wild_statement_type *ptr,
|
||||
|
||||
static void
|
||||
output_section_callback_tree_to_list (lang_wild_statement_type *ptr,
|
||||
lang_section_bst_type *tree,
|
||||
void *output)
|
||||
lang_section_bst_type *tree,
|
||||
void *output)
|
||||
{
|
||||
if (tree->left)
|
||||
output_section_callback_tree_to_list (ptr, tree->left, output);
|
||||
|
||||
lang_add_section (& ptr->children, tree->section,
|
||||
(lang_output_section_statement_type *) output);
|
||||
lang_add_section (&ptr->children, tree->section,
|
||||
(lang_output_section_statement_type *) output);
|
||||
|
||||
if (tree->right)
|
||||
output_section_callback_tree_to_list (ptr, tree->right, output);
|
||||
@@ -1578,15 +1578,15 @@ lang_insert_orphan (asection *s,
|
||||
as = *place->section;
|
||||
|
||||
if (!as)
|
||||
{
|
||||
/* Put the section at the end of the list. */
|
||||
{
|
||||
/* Put the section at the end of the list. */
|
||||
|
||||
/* Unlink the section. */
|
||||
bfd_section_list_remove (output_bfd, snew);
|
||||
|
||||
/* Now tack it back on in the right place. */
|
||||
bfd_section_list_append (output_bfd, snew);
|
||||
}
|
||||
}
|
||||
else if (as != snew && as->prev != snew)
|
||||
{
|
||||
/* Unlink the section. */
|
||||
@@ -2365,7 +2365,7 @@ add_excluded_libs (const char *list)
|
||||
entry->name[end - p] = '\0';
|
||||
excluded_libs = entry;
|
||||
if (*end == '\0')
|
||||
break;
|
||||
break;
|
||||
p = end + 1;
|
||||
}
|
||||
}
|
||||
@@ -2553,15 +2553,16 @@ wild (lang_wild_statement_type *s,
|
||||
struct wildcard_list *sec;
|
||||
|
||||
if (s->handler_data[0]
|
||||
&& (s->handler_data[0]->spec.sorted == by_name)
|
||||
&& s->handler_data[0]->spec.sorted == by_name
|
||||
&& !s->filenames_sorted)
|
||||
{
|
||||
lang_section_bst_type *tree;
|
||||
|
||||
walk_wild (s, output_section_callback_fast, output);
|
||||
|
||||
if (s->handler_data[1])
|
||||
output_section_callback_tree_to_list (s,
|
||||
(lang_section_bst_type *) s->handler_data[1],
|
||||
output);
|
||||
tree = (lang_section_bst_type *) s->handler_data[1];
|
||||
if (tree)
|
||||
output_section_callback_tree_to_list (s, tree, output);
|
||||
s->handler_data[1] = NULL;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user