summaryrefslogtreecommitdiffstats
path: root/gold/main.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2008-01-09 19:57:45 +0000
committerIan Lance Taylor <iant@google.com>2008-01-09 19:57:45 +0000
commite5756efb6d46f569d2e99d19f726b32b84f58bd7 (patch)
tree953c35bf025a640d99bccbd4acbce67dc8b677b5 /gold/main.cc
parentcda30489fc0f7870150158863780d67f5efedd90 (diff)
downloadppe42-binutils-e5756efb6d46f569d2e99d19f726b32b84f58bd7.tar.gz
ppe42-binutils-e5756efb6d46f569d2e99d19f726b32b84f58bd7.zip
Support assignments and expressions in linker scripts.
Diffstat (limited to 'gold/main.cc')
-rw-r--r--gold/main.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/gold/main.cc b/gold/main.cc
index 2874a2d4bd..fb201d7fb0 100644
--- a/gold/main.cc
+++ b/gold/main.cc
@@ -1,6 +1,6 @@
// main.cc -- gold main function.
-// Copyright 2006, 2007 Free Software Foundation, Inc.
+// Copyright 2006, 2007, 2008 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
@@ -27,6 +27,7 @@
#endif
#include "libiberty.h"
+#include "script.h"
#include "options.h"
#include "parameters.h"
#include "errors.h"
@@ -58,8 +59,12 @@ main(int argc, char** argv)
// errors object.
initialize_parameters(&errors);
+ // Options which may be set by the command line or by linker
+ // scripts.
+ Script_options script_options;
+
// Handle the command line options.
- Command_line command_line;
+ Command_line command_line(&script_options);
command_line.process(argc - 1, argv + 1);
long start_time = 0;
@@ -82,7 +87,7 @@ main(int argc, char** argv)
Symbol_table symtab(command_line.number_of_input_files() * 1024);
// The layout object.
- Layout layout(command_line.options());
+ Layout layout(command_line.options(), &script_options);
// Get the search path from the -L options.
Dirsearch search_path;
OpenPOWER on IntegriCloud