aboutsummaryrefslogtreecommitdiff
path: root/gold/icf.cc
diff options
context:
space:
mode:
authorSriraman Tallam <tmsriram@google.com>2010-09-28 17:14:15 +0000
committerSriraman Tallam <tmsriram@google.com>2010-09-28 17:14:15 +0000
commitc95e9f279130c09af2c427065700e3e08500b168 (patch)
tree78e7735b04680083b0cbc1d67e17d4c024dae2cd /gold/icf.cc
parent22e603ef762487e8a761d443a94168493a46db25 (diff)
downloadgdb-c95e9f279130c09af2c427065700e3e08500b168.zip
gdb-c95e9f279130c09af2c427065700e3e08500b168.tar.gz
gdb-c95e9f279130c09af2c427065700e3e08500b168.tar.bz2
2010-09-28 Sriraman Tallam <tmsriram@google.com>
* target.h (Target::can_icf_inline_merge_sections): New virtual function. * x86_64.cc (Target__x86_64::can_icf_inline_merge_sections): New virtual function. * i386.cc (Target_i386::can_icf_inline_merge_sections): New virtual function. * icf.cc (get_section_contents): Inline merge sections only when target allows it.
Diffstat (limited to 'gold/icf.cc')
-rw-r--r--gold/icf.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gold/icf.cc b/gold/icf.cc
index 31312bb..09cb1d4 100644
--- a/gold/icf.cc
+++ b/gold/icf.cc
@@ -366,7 +366,8 @@ get_section_contents(bool first_iteration,
uint64_t secn_flags = (it_v->first)->section_flags(it_v->second);
// This reloc points to a merge section. Hash the
// contents of this section.
- if ((secn_flags & elfcpp::SHF_MERGE) != 0)
+ if ((secn_flags & elfcpp::SHF_MERGE) != 0
+ && parameters->target().can_icf_inline_merge_sections ())
{
uint64_t entsize =
(it_v->first)->section_entsize(it_v->second);