From a7dac15368485853f4bd463352afb9b49517b624 Mon Sep 17 00:00:00 2001 From: Cary Coutant Date: Thu, 29 Sep 2011 17:04:36 +0000 Subject: [PATCH] * gold/incremental.cc (Sized_incremental_binary::do_process_got_plt): Check for NULL. * gold/symtab.cc (Symbol_table::add_from_relobj): Ignore version symbols during incremental update. (Symbol_table::add_from_dynobj): Likewise. --- gold/ChangeLog | 8 ++++++++ gold/incremental.cc | 2 +- gold/symtab.cc | 13 +++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/gold/ChangeLog b/gold/ChangeLog index 9b56527d8d8..a00a8e4d1fd 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,11 @@ +2011-09-29 Cary Coutant + + * gold/incremental.cc (Sized_incremental_binary::do_process_got_plt): + Check for NULL. + * gold/symtab.cc (Symbol_table::add_from_relobj): Ignore version + symbols during incremental update. + (Symbol_table::add_from_dynobj): Likewise. + 2011-09-27 Viktor Kutuzov Ian Lance Taylor diff --git a/gold/incremental.cc b/gold/incremental.cc index b422827e5a7..cbf6fbaae28 100644 --- a/gold/incremental.cc +++ b/gold/incremental.cc @@ -685,7 +685,7 @@ Sized_incremental_binary::do_process_got_plt( gold_assert(plt_desc >= first_global && plt_desc < symtab_count); Symbol* sym = this->global_symbol(plt_desc - first_global); // Add the PLT entry only if the symbol is still referenced. - if (sym->in_reg()) + if (sym != NULL && sym->in_reg()) { gold_debug(DEBUG_INCREMENTAL, "PLT entry %d: %s", diff --git a/gold/symtab.cc b/gold/symtab.cc index ff1b5caa36f..a90fee4af04 100644 --- a/gold/symtab.cc +++ b/gold/symtab.cc @@ -1143,6 +1143,14 @@ Symbol_table::add_from_relobj( bool is_default_version = false; bool is_forced_local = false; + // FIXME: For incremental links, we don't store version information, + // so we need to ignore version symbols for now. + if (parameters->incremental_update() && ver != NULL) + { + namelen = ver - name; + ver = NULL; + } + if (ver != NULL) { // The symbol name is of the form foo@VERSION or foo@@VERSION @@ -1346,6 +1354,11 @@ Symbol_table::add_from_dynobj( return; } + // FIXME: For incremental links, we don't store version information, + // so we need to ignore version symbols for now. + if (parameters->incremental_update()) + versym = NULL; + if (versym != NULL && versym_size / 2 < count) { dynobj->error(_("too few symbol versions")); -- 2.30.2