summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--binutils-2.21/gold/layout.cc3
-rw-r--r--binutils-2.22/gold/layout.cc3
-rw-r--r--binutils-2.23/gold/layout.cc3
3 files changed, 6 insertions, 3 deletions
diff --git a/binutils-2.21/gold/layout.cc b/binutils-2.21/gold/layout.cc
index 14100a99..5f7259cc 100644
--- a/binutils-2.21/gold/layout.cc
+++ b/binutils-2.21/gold/layout.cc
@@ -527,7 +527,8 @@ bool
Layout::include_section(Sized_relobj_file<size, big_endian>*, const char* name,
const elfcpp::Shdr<size, big_endian>& shdr)
{
- if (shdr.get_sh_flags() & elfcpp::SHF_EXCLUDE)
+ if (!parameters->options().relocatable()
+ && (shdr.get_sh_flags() & elfcpp::SHF_EXCLUDE))
return false;
switch (shdr.get_sh_type())
diff --git a/binutils-2.22/gold/layout.cc b/binutils-2.22/gold/layout.cc
index fb53c217..bad1a522 100644
--- a/binutils-2.22/gold/layout.cc
+++ b/binutils-2.22/gold/layout.cc
@@ -580,7 +580,8 @@ bool
Layout::include_section(Sized_relobj_file<size, big_endian>*, const char* name,
const elfcpp::Shdr<size, big_endian>& shdr)
{
- if (shdr.get_sh_flags() & elfcpp::SHF_EXCLUDE)
+ if (!parameters->options().relocatable()
+ && (shdr.get_sh_flags() & elfcpp::SHF_EXCLUDE))
return false;
switch (shdr.get_sh_type())
diff --git a/binutils-2.23/gold/layout.cc b/binutils-2.23/gold/layout.cc
index fb53c217..bad1a522 100644
--- a/binutils-2.23/gold/layout.cc
+++ b/binutils-2.23/gold/layout.cc
@@ -580,7 +580,8 @@ bool
Layout::include_section(Sized_relobj_file<size, big_endian>*, const char* name,
const elfcpp::Shdr<size, big_endian>& shdr)
{
- if (shdr.get_sh_flags() & elfcpp::SHF_EXCLUDE)
+ if (!parameters->options().relocatable()
+ && (shdr.get_sh_flags() & elfcpp::SHF_EXCLUDE))
return false;
switch (shdr.get_sh_type())