aboutsummaryrefslogtreecommitdiff
path: root/gold/gold.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2008-05-07 06:08:01 +0000
committerIan Lance Taylor <ian@airs.com>2008-05-07 06:08:01 +0000
commitf3e9c5c5170afd576cb1c31464472587aba05f52 (patch)
tree86f9b846be987b04ad87320629f7d316fc6c0779 /gold/gold.cc
parentb26238c07d9f3f8d617d53b44869d76a7cdaa563 (diff)
downloadgdb-f3e9c5c5170afd576cb1c31464472587aba05f52.zip
gdb-f3e9c5c5170afd576cb1c31464472587aba05f52.tar.gz
gdb-f3e9c5c5170afd576cb1c31464472587aba05f52.tar.bz2
PR 6049
* options.h (DEFINE_set): Add VARNAME_begin and VARNAME_end functions. (class General_options): Remove existing --undefined, and add --no-undefined instead. Add new --undefined as synonym for -u. * archive.cc (Archive::add_symbols): Check whether symbol was named with -u. * gold.cc (queue_middle_tasks): Add -u symbols to symbol table. * symtab.h (class Symbol): Rename CONSTANT to IS_CONSTANT; change all uses. Add IS_UNDEFINED. Update declarations to split different versions of init_base. Declare init_base_undefined. (Symbol::is_defined): Handle IS_UNDEFINED. (Symbol::is_undefined): Likewise. (Symbol::is_weak_undefined): Call is_undefined. (Symbol::is_absolute): Handle IS_CONSTANT. (class Sized_symbol): Update declarations to split different versions of init. Declare init_undefined. (class Symbol_table): Declare new functions. * symtab.cc (Symbol::init_base_object): Rename from init_base. Change all callers. (Symbol::init_base_output_data): Likewise. (Symbol::init_base_output_segment): Likewise. (Symbol::init_base_constant): Likewise. (Symbol::init_base_undefined): New function. (Sized_symbol::init_object): Rename from init. Change all callers. (Sized_symbol::init_output_data): Likewise. (Sized_symbol::init_output_segment): Likewise. (Sized_symbol::init_constant): Likewise. (Sized_symbol::init_undefined): New function. (Symbol_table::add_undefined_symbols_from_command_line): New function. (Symbol_table::do_add_undefined_symbols_from_command_line): New function. (Symbol::final_value_is_known): Handle IS_UNDEFINED. (Symbol::output_section): Likewise. (Symbol::set_output_section): Likewise. (Symbol_table::sized_finalize_symbol): Likewise. (Symbol_table::sized_write_globals): Likewise. * resolve.cc (Symbol_table::should_override): Likewise. (Symbol::override_base_with_special): Likewise.
Diffstat (limited to 'gold/gold.cc')
-rw-r--r--gold/gold.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/gold/gold.cc b/gold/gold.cc
index 54b0828..396a5a9 100644
--- a/gold/gold.cc
+++ b/gold/gold.cc
@@ -212,6 +212,9 @@ queue_middle_tasks(const General_options& options,
// Define symbols from any linker scripts.
layout->define_script_symbols(symtab);
+ // Add any symbols named with -u options to the symbol table.
+ symtab->add_undefined_symbols_from_command_line();
+
// Attach sections to segments.
layout->attach_sections_to_segments();