+2005-12-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/2065
+ * ldlang.c (output_statement_newfunc): Revert the change made on
+ 2005-11-16.
+ (output_prev_sec_find): Likewsise.
+ * ldlang.h (lang_statement_list_type): Likewsise.
+
2005-12-16 Nathan Sidwell <nathan@codesourcery.com>
Second part of ms1 to mt renaming.
(lang_statement_union_type *) &ret->os,
&ret->os.header.next);
- ret->os.prev = &((*lang_output_section_statement.tail)
- ->output_section_statement);
/* GCC's strict aliasing rules prevent us from just casting the
address, so we store the pointer in a variable and cast that
instead. */
static asection *
output_prev_sec_find (lang_output_section_statement_type *os)
{
+ asection *s = (asection *) NULL;
lang_output_section_statement_type *lookup;
- for (lookup = os->prev; lookup != NULL; lookup = lookup->prev)
+ for (lookup = &lang_output_section_statement.head->output_section_statement;
+ lookup != NULL;
+ lookup = lookup->next)
{
if (lookup->constraint == -1)
continue;
+ if (lookup == os)
+ return s;
if (lookup->bfd_section != NULL && lookup->bfd_section->owner != NULL)
- return lookup->bfd_section;
+ s = lookup->bfd_section;
}
return NULL;
lang_statement_header_type header;
lang_statement_list_type children;
struct lang_output_section_statement_struct *next;
- struct lang_output_section_statement_struct *prev;
const char *name;
asection *bfd_section;
lang_memory_region_type *region;