aboutsummaryrefslogtreecommitdiff
path: root/gold/reloc.cc
diff options
context:
space:
mode:
authorSriraman Tallam <tmsriram@google.com>2009-08-05 20:51:56 +0000
committerSriraman Tallam <tmsriram@google.com>2009-08-05 20:51:56 +0000
commitef15dade898122c47e0f7dc0f48c1399c444afdd (patch)
treecd0de8656f3097a835ddfdc5bf0c51f12aed23f3 /gold/reloc.cc
parent9cc305ec2050ff3cda567d40cf87a2814d8d2ff3 (diff)
downloadbinutils-ef15dade898122c47e0f7dc0f48c1399c444afdd.zip
binutils-ef15dade898122c47e0f7dc0f48c1399c444afdd.tar.gz
binutils-ef15dade898122c47e0f7dc0f48c1399c444afdd.tar.bz2
*** empty log message ***
Diffstat (limited to 'gold/reloc.cc')
-rw-r--r--gold/reloc.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/gold/reloc.cc b/gold/reloc.cc
index 1985867..0842a73 100644
--- a/gold/reloc.cc
+++ b/gold/reloc.cc
@@ -65,12 +65,12 @@ Read_relocs::run(Workqueue* workqueue)
this->object_->set_relocs_data(rd);
this->object_->release();
- // If garbage collection is desired, we must process the relocs
- // instead of scanning the relocs as reloc processing is necessary
- // to determine unused sections.
- if (parameters->options().gc_sections())
- {
- workqueue->queue_next(new Gc_process_relocs(this->options_,
+ // If garbage collection or identical comdat folding is desired, we
+ // process the relocs first before scanning them. Scanning of relocs is
+ // done only after garbage or identical sections is identified.
+ if (parameters->options().gc_sections() || parameters->options().icf())
+ {
+ workqueue->queue_next(new Gc_process_relocs(this->options_,
this->symtab_,
this->layout_,
this->object_, rd,
@@ -418,7 +418,7 @@ Sized_relobj<size, big_endian>::do_scan_relocs(const General_options& options,
// When garbage collection is on, unreferenced sections are not included
// in the link that would have been included normally. This is known only
// after Read_relocs hence this check has to be done again.
- if (parameters->options().gc_sections())
+ if (parameters->options().gc_sections() || parameters->options().icf())
{
if (p->output_section == NULL)
continue;