aboutsummaryrefslogtreecommitdiff
path: root/gold/script.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2009-10-16 05:19:07 +0000
committerIan Lance Taylor <ian@airs.com>2009-10-16 05:19:07 +0000
commit12edd763cc3b83a257eb3173caca075f027e9afa (patch)
treede7243bf3401d94dc825b2604068a61a0792d086 /gold/script.cc
parent68b6574b4d15cd06198aac40c7ad9624a80c1bdb (diff)
downloadfsf-binutils-gdb-12edd763cc3b83a257eb3173caca075f027e9afa.zip
fsf-binutils-gdb-12edd763cc3b83a257eb3173caca075f027e9afa.tar.gz
fsf-binutils-gdb-12edd763cc3b83a257eb3173caca075f027e9afa.tar.bz2
* script.cc (Script_options::add_symbol_assignment): Always add a
dot assginment to script_sections_. * script-sections.cc (Script_sections::add_dot_assignment): Initialize if necessary.
Diffstat (limited to 'gold/script.cc')
-rw-r--r--gold/script.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/gold/script.cc b/gold/script.cc
index de6f4fc..d0ffe41 100644
--- a/gold/script.cc
+++ b/gold/script.cc
@@ -1,6 +1,6 @@
// script.cc -- handle linker scripts for gold.
-// 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.
@@ -1070,10 +1070,11 @@ Script_options::add_symbol_assignment(const char* name, size_t length,
{
if (provide || hidden)
gold_error(_("invalid use of PROVIDE for dot symbol"));
- if (!this->script_sections_.in_sections_clause())
- gold_error(_("invalid assignment to dot outside of SECTIONS"));
- else
- this->script_sections_.add_dot_assignment(value);
+
+ // The GNU linker permits assignments to dot outside of SECTIONS
+ // clauses and treats them as occurring inside, so we don't
+ // check in_sections_clause here.
+ this->script_sections_.add_dot_assignment(value);
}
}