This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] gold: Don't combine sections with non-zero/zero flags
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: binutils at sourceware dot org
- Date: Mon, 24 Jun 2019 12:53:35 -0700
- Subject: [PATCH] gold: Don't combine sections with non-zero/zero flags
Gold shouldn't combine sections with non-zero flags and zero flags.
PR gold/17556
* layout.cc (Layout::get_output_section): Don't combine sections
with non-zero flags and zero flags.
---
gold/layout.cc | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/gold/layout.cc b/gold/layout.cc
index 73642b6b61..52908e92c1 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -868,16 +868,6 @@ Layout::get_output_section(const char* name, Stringpool::Key name_key,
&& (same_name->flags() & elfcpp::SHF_TLS) == 0)
os = same_name;
}
- else if ((flags & elfcpp::SHF_TLS) == 0)
- {
- elfcpp::Elf_Xword zero_flags = 0;
- const Key zero_key(name_key, std::make_pair(lookup_type,
- zero_flags));
- Section_name_map::iterator p =
- this->section_name_map_.find(zero_key);
- if (p != this->section_name_map_.end())
- os = p->second;
- }
}
if (os == NULL)
--
2.20.1