aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/beos.em
diff options
context:
space:
mode:
Diffstat (limited to 'ld/emultempl/beos.em')
-rw-r--r--ld/emultempl/beos.em19
1 files changed, 9 insertions, 10 deletions
diff --git a/ld/emultempl/beos.em b/ld/emultempl/beos.em
index ac27c5a..e417693 100644
--- a/ld/emultempl/beos.em
+++ b/ld/emultempl/beos.em
@@ -664,32 +664,31 @@ gld_${EMULATION_NAME}_before_allocation (void)
but I'm leaving this here in case we want to enable it for sections
which are not mentioned in the linker script. */
-static bfd_boolean
-gld${EMULATION_NAME}_place_orphan (asection *s)
+static lang_output_section_statement_type *
+gld${EMULATION_NAME}_place_orphan (asection *s,
+ const char *secname,
+ int constraint)
{
- const char *secname;
char *output_secname, *ps;
lang_output_section_statement_type *os;
lang_statement_union_type *l;
if ((s->flags & SEC_ALLOC) == 0)
- return FALSE;
+ return NULL;
/* Don't process grouped sections unless doing a final link.
If they're marked as COMDAT sections, we don't want .text\$foo to
end up in .text and then have .text disappear because it's marked
link-once-discard. */
if (link_info.relocatable)
- return FALSE;
-
- secname = bfd_get_section_name (s->owner, s);
+ return NULL;
/* Everything from the '\$' on gets deleted so don't allow '\$' as the
first character. */
if (*secname == '\$')
einfo ("%P%F: section %s has '\$' as first character\n", secname);
if (strchr (secname + 1, '\$') == NULL)
- return FALSE;
+ return NULL;
/* Look up the output section. The Microsoft specs say sections names in
image files never contain a '\$'. Fortunately, lang_..._lookup creates
@@ -697,7 +696,7 @@ gld${EMULATION_NAME}_place_orphan (asection *s)
output_secname = xstrdup (secname);
ps = strchr (output_secname + 1, '\$');
*ps = 0;
- os = lang_output_section_statement_lookup (output_secname);
+ os = lang_output_section_statement_lookup (output_secname, constraint, TRUE);
/* Find the '\$' wild statement for this section. We currently require the
linker script to explicitly mention "*(.foo\$)".
@@ -727,7 +726,7 @@ gld${EMULATION_NAME}_place_orphan (asection *s)
sort_sections. */
lang_add_section (&l->wild_statement.children, s, os);
- return TRUE;
+ return os;
}
static char *