aboutsummaryrefslogtreecommitdiff
path: root/gold/layout.cc
diff options
context:
space:
mode:
authorSriraman Tallam <tmsriram@google.com>2012-10-16 16:50:32 +0000
committerSriraman Tallam <tmsriram@google.com>2012-10-16 16:50:32 +0000
commitae034989da9cc0805cb02a6bd53f4fce3a5adfe9 (patch)
tree76ad6ad67f4fccb35f28ecdf37daa7c98294cb4e /gold/layout.cc
parentbb3f9ed8ba3cfb9a271b84cc8f1d79878fb15e78 (diff)
downloadgdb-ae034989da9cc0805cb02a6bd53f4fce3a5adfe9.zip
gdb-ae034989da9cc0805cb02a6bd53f4fce3a5adfe9.tar.gz
gdb-ae034989da9cc0805cb02a6bd53f4fce3a5adfe9.tar.bz2
2012-10-16 Sriraman Tallam <tmsriram@google.com>
* layout.cc (Layout::include_section): Keep sections marked SHF_EXCLUDE when doing relocatable links.
Diffstat (limited to 'gold/layout.cc')
-rw-r--r--gold/layout.cc3
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())