- {
- if (os == NULL)
- return FALSE;
- hold_text.os = os;
- }
-
- bfd_section = place->os->bfd_section;
- if (place->section == NULL && bfd_section == NULL)
- bfd_section = output_prev_sec_find (place->os);
-
- if (place->section != NULL
- || (bfd_section != NULL
- && bfd_section != snew))
- {
- /* Shuffle the section to make the output file look neater. This is
- really only cosmetic. */
- if (place->section == NULL)
- /* Put orphans after the first section on the list. */
- place->section = &bfd_section->next;
-
- /* Unlink the section. */
- for (pps = &output_bfd->sections; *pps != snew; pps = &(*pps)->next)
- ;
- bfd_section_list_remove (output_bfd, pps);
-
- /* Now tack it on to the "place->os" section list. */
- bfd_section_list_insert (output_bfd, place->section, snew);
- }
- place->section = &snew->next; /* Save the end of this list. */
-
- if (add.head != NULL)
- {
- /* We try to put the output statements in some sort of reasonable
- order here, because they determine the final load addresses of
- the orphan sections. */
- if (place->stmt == NULL)
- {
- /* Put the new statement list right at the head. */
- *add.tail = place->os->header.next;
- place->os->header.next = add.head;
- }
- else
- {
- /* Put it after the last orphan statement we added. */
- *add.tail = *place->stmt;
- *place->stmt = add.head;
- }
-
- /* Fix the global list pointer if we happened to tack our new list
- at the tail. */
- if (*old->tail == add.head)
- old->tail = add.tail;
-
- /* Save the end of this list. */
- place->stmt = add.tail;
- }