diff options
Diffstat (limited to 'gold/layout.cc')
-rw-r--r-- | gold/layout.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gold/layout.cc b/gold/layout.cc index 86e39eb..022f5a9 100644 --- a/gold/layout.cc +++ b/gold/layout.cc @@ -582,7 +582,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()) |