+ 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 ? normal_section : noload_section, 0,
+ align, subalign, NULL, 0, 0);
+ 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 = none;
+ tmp->spec.section_flag_list = NULL;
+ 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 = none;
+ tmp->spec.section_flag_list = NULL;
+ lang_add_wild (NULL, tmp, false);
+ }
+
+ lang_leave_output_section_statement (0, "*default*", NULL, NULL);
+
+ p = p->next;
+ }