diff options
author | Ian Lance Taylor <ian@airs.com> | 2011-02-01 14:54:37 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2011-02-01 14:54:37 +0000 |
commit | 096bd0bb6771fea1963ca6634b4aaca493f24051 (patch) | |
tree | c6a8d7b93f3c110584af397bae4961ac3bc7a6b4 /gold | |
parent | 8f2afa8903cc1ce28bf250cda4ebb027fa72f0f3 (diff) | |
download | fsf-binutils-gdb-096bd0bb6771fea1963ca6634b4aaca493f24051.zip fsf-binutils-gdb-096bd0bb6771fea1963ca6634b4aaca493f24051.tar.gz fsf-binutils-gdb-096bd0bb6771fea1963ca6634b4aaca493f24051.tar.bz2 |
Backport from mainline:
2011-01-25 Ian Lance Taylor <iant@google.com>
* script.cc (script_add_extern): Rewrite to use
add_symbol_reference.
Diffstat (limited to 'gold')
-rw-r--r-- | gold/ChangeLog | 7 | ||||
-rw-r--r-- | gold/script.cc | 10 |
2 files changed, 10 insertions, 7 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog index 886a0ce..e7bc837 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,10 @@ +2011-02-01 Ian Lance Taylor <iant@google.com> + + Backport from mainline: + 2011-01-25 Ian Lance Taylor <iant@google.com> + * script.cc (script_add_extern): Rewrite to use + add_symbol_reference. + 2011-02-01 Alan Modra <amodra@gmail.com> Backport from mainline diff --git a/gold/script.cc b/gold/script.cc index ada9abc..b3138bf 100644 --- a/gold/script.cc +++ b/gold/script.cc @@ -1,6 +1,6 @@ // script.cc -- handle linker scripts for gold. -// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +// Copyright 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. // Written by Ian Lance Taylor <iant@google.com>. // This file is part of gold. @@ -2576,12 +2576,8 @@ yyerror(void* closurev, const char* message) extern "C" void script_add_extern(void* closurev, const char* name, size_t length) { - // We treat exactly like -u NAME. FIXME: If it seems useful, we - // could handle this after the command line has been read, by adding - // entries to the symbol table directly. - std::string arg("--undefined="); - arg.append(name, length); - script_parse_option(closurev, arg.c_str(), arg.size()); + Parser_closure* closure = static_cast<Parser_closure*>(closurev); + closure->script_options()->add_symbol_reference(name, length); } // Called by the bison parser to add a file to the link. |