diff options
Diffstat (limited to 'ld/emultempl/mmo.em')
-rw-r--r-- | ld/emultempl/mmo.em | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ld/emultempl/mmo.em b/ld/emultempl/mmo.em index 8b02fd6..f5ba6dd 100644 --- a/ld/emultempl/mmo.em +++ b/ld/emultempl/mmo.em @@ -46,8 +46,10 @@ fragment <<EOF SEC_READONLY sections right after MMO_TEXT_SECTION_NAME. Much borrowed from elf32.em. */ -static bfd_boolean -mmo_place_orphan (asection *s) +static lang_output_section_statement_type * +mmo_place_orphan (asection *s, + const char *secname, + int constraint ATTRIBUTE_UNUSED) { static struct orphan_save hold_text = { @@ -56,17 +58,15 @@ mmo_place_orphan (asection *s) 0, 0, 0, 0 }; struct orphan_save *place; - const char *secname; lang_output_section_statement_type *after; lang_output_section_statement_type *os; /* We have nothing to say for anything other than a final link. */ if (link_info.relocatable || (s->flags & (SEC_EXCLUDE | SEC_LOAD)) != SEC_LOAD) - return FALSE; + return NULL; /* Only care for sections we're going to load. */ - secname = s->name; os = lang_output_section_find (secname); /* We have an output section by this name. Place the section inside it @@ -74,13 +74,13 @@ mmo_place_orphan (asection *s) if (os != NULL) { lang_add_section (&os->children, s, os); - return TRUE; + return os; } /* If this section does not have .text-type section flags or there's no MMO_TEXT_SECTION_NAME, we don't have anything to say. */ if ((s->flags & (SEC_CODE | SEC_READONLY)) == 0) - return FALSE; + return NULL; if (hold_text.os == NULL) hold_text.os = lang_output_section_find (hold_text.name); @@ -93,7 +93,7 @@ mmo_place_orphan (asection *s) /* If there's an output section by this name, we'll use it, regardless of section flags, in contrast to what's done in elf32.em. */ - os = lang_insert_orphan (s, secname, after, place, NULL, NULL); + os = lang_insert_orphan (s, secname, 0, after, place, NULL, NULL); /* We need an output section for .text as a root, so if there was none (might happen with a peculiar linker script such as in "map @@ -102,7 +102,7 @@ mmo_place_orphan (asection *s) if (hold_text.os == NULL) hold_text.os = os; - return TRUE; + return os; } /* Remove the spurious settings of SEC_RELOC that make it to the output at |