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/hppaelf.em1
-rw-r--r--ld/emultempl/ppc64elf.em2
3 files changed, 5 insertions, 1 deletions
diff --git a/ld/emultempl/armelf.em b/ld/emultempl/armelf.em
index beeb40c..5505f12 100644
--- a/ld/emultempl/armelf.em
+++ b/ld/emultempl/armelf.em
@@ -67,7 +67,8 @@ static void
arm_elf_set_bfd_for_interworking (lang_statement_union_type *statement)
{
if (statement->header.type == lang_input_section_enum
- && !statement->input_section.ifile->just_syms_flag)
+ && !statement->input_section.ifile->just_syms_flag
+ && (statement->input_section.section->flags & SEC_EXCLUDE) == 0)
{
asection *i = statement->input_section.section;
asection *output_section = i->output_section;
diff --git a/ld/emultempl/hppaelf.em b/ld/emultempl/hppaelf.em
index 93e88ad..edd8e01 100644
--- a/ld/emultempl/hppaelf.em
+++ b/ld/emultempl/hppaelf.em
@@ -239,6 +239,7 @@ build_section_lists (lang_statement_union_type *statement)
{
if (statement->header.type == lang_input_section_enum
&& !statement->input_section.ifile->just_syms_flag
+ && (statement->input_section.section->flags & SEC_EXCLUDE) == 0
&& statement->input_section.section->output_section != NULL
&& statement->input_section.section->output_section->owner == output_bfd)
{
diff --git a/ld/emultempl/ppc64elf.em b/ld/emultempl/ppc64elf.em
index 4f408a9..6a60f0c 100644
--- a/ld/emultempl/ppc64elf.em
+++ b/ld/emultempl/ppc64elf.em
@@ -288,6 +288,7 @@ build_toc_list (lang_statement_union_type *statement)
{
if (statement->header.type == lang_input_section_enum
&& !statement->input_section.ifile->just_syms_flag
+ && (statement->input_section.section->flags & SEC_EXCLUDE) == 0
&& statement->input_section.section->output_section == toc_section)
ppc64_elf_next_toc_section (&link_info, statement->input_section.section);
}
@@ -298,6 +299,7 @@ build_section_lists (lang_statement_union_type *statement)
{
if (statement->header.type == lang_input_section_enum
&& !statement->input_section.ifile->just_syms_flag
+ && (statement->input_section.section->flags & SEC_EXCLUDE) == 0
&& statement->input_section.section->output_section != NULL
&& statement->input_section.section->output_section->owner == output_bfd)
{