summaryrefslogtreecommitdiffstats
path: root/binutils-2.19/gold/output.cc
diff options
context:
space:
mode:
Diffstat (limited to 'binutils-2.19/gold/output.cc')
-rw-r--r--binutils-2.19/gold/output.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/binutils-2.19/gold/output.cc b/binutils-2.19/gold/output.cc
index dbdad78..280b125 100644
--- a/binutils-2.19/gold/output.cc
+++ b/binutils-2.19/gold/output.cc
@@ -1944,6 +1944,7 @@ Output_section::Output_section(const char* name, elfcpp::Elf_Word type,
is_entsize_zero_(false),
section_offsets_need_adjustment_(false),
is_noload_(false),
+ always_keeps_input_sections_(false),
tls_offset_(0),
checkpoint_(NULL),
lookup_maps_(new Output_section_lookup_maps)
@@ -2032,8 +2033,10 @@ Output_section::add_input_section(Sized_relobj<size, big_endian>* object,
{
// Keep information about merged input sections for rebuilding fast
// lookup maps if we have sections-script or we do relaxation.
- bool keeps_input_sections =
- have_sections_script || parameters->target().may_relax();
+ bool keeps_input_sections = (this->always_keeps_input_sections_
+ || have_sections_script
+ || parameters->target().may_relax());
+
if (this->add_merge_input_section(object, shndx, sh_flags, entsize,
addralign, keeps_input_sections))
{
@@ -2087,7 +2090,8 @@ Output_section::add_input_section(Sized_relobj<size, big_endian>* object,
// track of sections, or if we are relaxing. Also, if this is a
// section which requires sorting, or which may require sorting in
// the future, we keep track of the sections.
- if (have_sections_script
+ if (this->always_keeps_input_sections_
+ || have_sections_script
|| !this->input_sections_.empty()
|| this->may_sort_attached_input_sections()
|| this->must_sort_attached_input_sections()