aboutsummaryrefslogtreecommitdiff
path: root/gold/main.cc
diff options
context:
space:
mode:
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 8e8e8f9..0019863 100644
--- a/gold/main.cc
+++ b/gold/main.cc
@@ -1,6 +1,6 @@
// main.cc -- gold main function.
-// Copyright 2006, 2007, 2008 Free Software Foundation, Inc.
+// Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
@@ -43,6 +43,7 @@
#include "symtab.h"
#include "layout.h"
#include "plugin.h"
+#include "gc.h"
using namespace gold;
@@ -201,6 +202,9 @@ main(int argc, char** argv)
// The list of input objects.
Input_objects input_objects;
+ // The Garbage Collection Object.
+ Garbage_collection gc;
+
// 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
@@ -208,6 +212,9 @@ main(int argc, char** argv)
Symbol_table symtab(command_line.number_of_input_files() * 1024,
command_line.version_script());
+ if (parameters->options().gc_sections())
+ symtab.set_gc(&gc);
+
// The layout object.
Layout layout(command_line.options(), &command_line.script_options());