aboutsummaryrefslogtreecommitdiff
path: root/gold/layout.cc
diff options
context:
space:
mode:
authorDoug Kwan <dougkwan@google.com>2010-10-20 15:30:54 +0000
committerDoug Kwan <dougkwan@google.com>2010-10-20 15:30:54 +0000
commitc9484ea5b3fb276265a52a420c9bd945b1a4f769 (patch)
treed8b3ade4536a60d0eb7b384b369cc87c8820fcb8 /gold/layout.cc
parente0ae9e28cc95e5148ec27d9465f880cc69ae5f46 (diff)
downloadgdb-c9484ea5b3fb276265a52a420c9bd945b1a4f769.zip
gdb-c9484ea5b3fb276265a52a420c9bd945b1a4f769.tar.gz
gdb-c9484ea5b3fb276265a52a420c9bd945b1a4f769.tar.bz2
2010-10-20 Doug Kwan <dougkwan@google.com>
* arm.cc (Arm_relobj::do_read_symbols): Warn about ARM EXIDX sections without SHF_LINK_ORDER flags. * layout.cc (Layout::choose_output_section): Do not filter SHF_LINK_ORDER flag in a relocatable link.
Diffstat (limited to 'gold/layout.cc')
-rw-r--r--gold/layout.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/gold/layout.cc b/gold/layout.cc
index 95f1de7..bc6a053 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -489,11 +489,15 @@ Layout::choose_output_section(const Relobj* relobj, const char* name,
// Some flags in the input section should not be automatically
// copied to the output section.
flags &= ~ (elfcpp::SHF_INFO_LINK
- | elfcpp::SHF_LINK_ORDER
| elfcpp::SHF_GROUP
| elfcpp::SHF_MERGE
| elfcpp::SHF_STRINGS);
+ // We only clear the SHF_LINK_ORDER flag in for
+ // a non-relocatable link.
+ if (!parameters->options().relocatable())
+ flags &= ~elfcpp::SHF_LINK_ORDER;
+
if (this->script_options_->saw_sections_clause())
{
// We are using a SECTIONS clause, so the output section is