aboutsummaryrefslogtreecommitdiff
path: root/gold/main.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/main.cc
parent9cc305ec2050ff3cda567d40cf87a2814d8d2ff3 (diff)
downloadgdb-ef15dade898122c47e0f7dc0f48c1399c444afdd.zip
gdb-ef15dade898122c47e0f7dc0f48c1399c444afdd.tar.gz
gdb-ef15dade898122c47e0f7dc0f48c1399c444afdd.tar.bz2
*** empty log message ***
Diffstat (limited to 'gold/main.cc')
-rw-r--r--gold/main.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/gold/main.cc b/gold/main.cc
index 84b4ae9..d8ef582 100644
--- a/gold/main.cc
+++ b/gold/main.cc
@@ -44,6 +44,7 @@
#include "layout.h"
#include "plugin.h"
#include "gc.h"
+#include "icf.h"
#include "incremental.h"
using namespace gold;
@@ -203,9 +204,12 @@ main(int argc, char** argv)
// The list of input objects.
Input_objects input_objects;
- // The Garbage Collection Object.
+ // The Garbage Collection (GC, --gc-sections) Object.
Garbage_collection gc;
+ // The Identical Code Folding (ICF, --icf) Object.
+ Icf icf;
+
// The symbol table. We're going to guess here how many symbols
// we're going to see based on the number of input files. Even when
// this is off, it means at worst we don't quite optimize hashtable
@@ -216,6 +220,9 @@ main(int argc, char** argv)
if (parameters->options().gc_sections())
symtab.set_gc(&gc);
+ if (parameters->options().icf())
+ symtab.set_icf(&icf);
+
// The layout object.
Layout layout(command_line.number_of_input_files(),
&command_line.script_options());