aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
diff options
context:
space:
mode:
Diffstat (limited to 'ld/emultempl')
-rw-r--r--ld/emultempl/elf32.em5
-rw-r--r--ld/emultempl/mmo.em4
-rw-r--r--ld/emultempl/pe.em4
3 files changed, 9 insertions, 4 deletions
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index 8e1c319..cf002e5 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -1032,7 +1032,8 @@ output_rel_find (asection *sec, int isdyn)
for (u = lang_output_section_statement.head; u; u = lookup->next)
{
lookup = &u->output_section_statement;
- if (strncmp (".rel", lookup->name, 4) == 0)
+ if (lookup->constraint != -1
+ && strncmp (".rel", lookup->name, 4) == 0)
{
int lookrela = lookup->name[4] == 'a';
@@ -1279,7 +1280,7 @@ gld${EMULATION_NAME}_place_orphan (lang_input_statement_type *file, asection *s)
os = lang_enter_output_section_statement (secname, address, 0,
(etree_type *) NULL,
(etree_type *) NULL,
- load_base);
+ load_base, 0);
lang_add_section (&os->children, s, os, file);
diff --git a/ld/emultempl/mmo.em b/ld/emultempl/mmo.em
index 38f1dbf..d6d30e6 100644
--- a/ld/emultempl/mmo.em
+++ b/ld/emultempl/mmo.em
@@ -47,6 +47,8 @@ output_prev_sec_find (lang_output_section_statement_type *os)
u = lookup->next)
{
lookup = &u->output_section_statement;
+ if (lookup->constraint == -1)
+ continue;
if (lookup == os)
break;
if (lookup->bfd_section != NULL
@@ -129,7 +131,7 @@ mmo_place_orphan (lang_input_statement_type *file, asection *s)
NULL, 0,
(etree_type *) NULL,
(etree_type *) NULL,
- (etree_type *) NULL);
+ (etree_type *) NULL, 0);
lang_add_section (&os->children, s, os, file);
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
index a3b50af..4438afd 100644
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
@@ -1501,6 +1501,8 @@ output_prev_sec_find (lang_output_section_statement_type *os)
u = lookup->next)
{
lookup = &u->output_section_statement;
+ if (lookup->constraint == -1)
+ continue;
if (lookup == os)
return s;
@@ -1664,7 +1666,7 @@ gld_${EMULATION_NAME}_place_orphan (lang_input_statement_type *file, asection *s
os = lang_enter_output_section_statement (outsecname, address, 0,
(etree_type *) NULL,
(etree_type *) NULL,
- (etree_type *) NULL);
+ (etree_type *) NULL, 0);
lang_add_section (&add_child, s, os, file);