aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
diff options
context:
space:
mode:
Diffstat (limited to 'ld/emultempl')
-rw-r--r--ld/emultempl/armelf.em3
-rw-r--r--ld/emultempl/xtensaelf.em6
2 files changed, 8 insertions, 1 deletions
diff --git a/ld/emultempl/armelf.em b/ld/emultempl/armelf.em
index efdcf5a..fb5bbf8 100644
--- a/ld/emultempl/armelf.em
+++ b/ld/emultempl/armelf.em
@@ -227,7 +227,8 @@ elf32_arm_add_stub_section (const char * stub_sec_name,
struct hook_stub_info info;
flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE
- | SEC_HAS_CONTENTS | SEC_RELOC | SEC_IN_MEMORY | SEC_KEEP);
+ | SEC_HAS_CONTENTS | SEC_RELOC | SEC_IN_MEMORY | SEC_KEEP
+ | SEC_LINKER_CREATED);
stub_sec = bfd_make_section_anyway_with_flags (stub_file->the_bfd,
stub_sec_name, flags);
if (stub_sec == NULL)
diff --git a/ld/emultempl/xtensaelf.em b/ld/emultempl/xtensaelf.em
index 1aca7b7..74bd11c 100644
--- a/ld/emultempl/xtensaelf.em
+++ b/ld/emultempl/xtensaelf.em
@@ -1224,6 +1224,12 @@ ld_build_required_section_dependence (lang_statement_union_type *s)
{
lang_statement_union_type *l = iter_stack_current (&stack);
+ if (l == NULL && link_info.non_contiguous_regions)
+ {
+ einfo (_("Relaxation not supported with --enable-non-contiguous-regions.\n"));
+ abort();
+ }
+
if (l->header.type == lang_input_section_enum)
{
lang_input_section_type *input;