+ for (ptr = order; ptr; ptr = ptr->next)
+ ptr->ok_to_load = 1;
+ }
+
+ /* Create the order of sections to load. */
+ if (order != (struct section_name_struct *) NULL)
+ {
+ /* Been told to output the sections in a certain order. */
+ struct section_name_struct *p = order;
+
+ while (p)
+ {
+ struct section_name_struct *aptr;
+ etree_type *align = 0;
+ etree_type *subalign = 0;
+ struct wildcard_list *tmp;
+
+ /* See if an alignment has been specified. */
+ for (aptr = alignment; aptr; aptr = aptr->next)
+ if (strcmp (aptr->name, p->name) == 0)
+ align = aptr->align;
+
+ for (aptr = subalignment; aptr; aptr = aptr->next)
+ if (strcmp (aptr->name, p->name) == 0)
+ subalign = aptr->subalign;
+
+ if (base == 0)
+ base = p->vma ? p->vma : exp_nameop (NAME, ".");
+
+ lang_enter_output_section_statement (p->name, base,
+ p->ok_to_load ? 0 : noload_section,
+ 1, align, subalign,
+ (etree_type *) NULL);
+ base = 0;
+ tmp = (struct wildcard_list *) xmalloc (sizeof *tmp);
+ tmp->next = NULL;
+ tmp->spec.name = p->name;
+ tmp->spec.exclude_name_list = NULL;
+ tmp->spec.sorted = FALSE;
+ lang_add_wild (NULL, tmp, FALSE);
+
+ /* If there is an alias for this section, add it too. */
+ for (aptr = alias; aptr; aptr = aptr->next)
+ if (strcmp (aptr->alias, p->name) == 0)
+ {
+ tmp = (struct wildcard_list *) xmalloc (sizeof *tmp);
+ tmp->next = NULL;
+ tmp->spec.name = aptr->name;
+ tmp->spec.exclude_name_list = NULL;
+ tmp->spec.sorted = FALSE;
+ lang_add_wild (NULL, tmp, FALSE);
+ }
+
+ lang_leave_output_section_statement
+ (0, "*default*", (struct lang_output_section_phdr_list *) NULL,
+ NULL);
+
+ p = p->next;
+ }
+ }
+
+ done_tree = 1;