aboutsummaryrefslogtreecommitdiff
path: root/gold/gold.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2010-01-06 05:30:24 +0000
committerIan Lance Taylor <ian@airs.com>2010-01-06 05:30:24 +0000
commit62dfdd4d1c7c79e81318115d1da67d4cb2b2e6d1 (patch)
tree7a61965b9e5e13b174ba0bc012cc432488828ba0 /gold/gold.cc
parentfe8afbc48fd3fba73600670fd2b0fcbfd45c440a (diff)
downloadgdb-62dfdd4d1c7c79e81318115d1da67d4cb2b2e6d1.zip
gdb-62dfdd4d1c7c79e81318115d1da67d4cb2b2e6d1.tar.gz
gdb-62dfdd4d1c7c79e81318115d1da67d4cb2b2e6d1.tar.bz2
PR 10980
* options.h (class General_options): Add --undefined-version. * script.cc (struct Version_expression): Add was_matched_by_symbol field. (Version_script_info::matched_symbol): New function. (Version_script_info::get_symbol_version_helper): Call matched_symbol. (Version_script_info::check_unmatched_names): New function. * script.h (class Version_script_info): Update declarations. * gold.cc (queue_middle_tasks): Handle --no-undefined-version.
Diffstat (limited to 'gold/gold.cc')
-rw-r--r--gold/gold.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/gold/gold.cc b/gold/gold.cc
index 15a8946..8251981 100644
--- a/gold/gold.cc
+++ b/gold/gold.cc
@@ -1,6 +1,6 @@
// gold.cc -- main linker functions
-// Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
@@ -443,6 +443,13 @@ queue_middle_tasks(const General_options& options,
// TODO: if this is too slow, do this as a task, rather than inline.
symtab->detect_odr_violations(task, options.output_file_name());
+ // Do the --no-undefined-version check.
+ if (!parameters->options().undefined_version())
+ {
+ Script_options* so = layout->script_options();
+ so->version_script_info()->check_unmatched_names(symtab);
+ }
+
// Create any automatic note sections.
layout->create_notes();