* gold patch committed to 2.21 branch: EXTERN in input file script
@ 2011-02-01 14:55 Ian Lance Taylor
0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2011-02-01 14:55 UTC (permalink / raw)
To: binutils; +Cc: Vladimir Simonov
[-- Attachment #1: Type: text/plain, Size: 371 bytes --]
I committed this patch to the binutils 2.21 branch to fix the case of
EXTERN appearing in a linker script which appears on the command line as
an ordinary input file.
Ian
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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: extern --]
[-- Type: text/x-diff, Size: 1226 bytes --]
Index: script.cc
===================================================================
RCS file: /cvs/src/src/gold/script.cc,v
retrieving revision 1.79
diff -u -p -r1.79 script.cc
--- script.cc 3 Nov 2010 17:18:23 -0000 1.79
+++ script.cc 1 Feb 2011 14:53:05 -0000
@@ -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* mess
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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-02-01 14:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-01 14:55 gold patch committed to 2.21 branch: EXTERN in input file script Ian Lance Taylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).