From: Cary Coutant Date: Tue, 22 May 2012 23:50:52 +0000 (+0000) Subject: gold/ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b24fdbf5e047e534ca9783af40dbefdf46f8bd0c;p=binutils-gdb.git gold/ * symtab.cc (Symbol::should_add_dynsym_entry): Check for relocatable object before exporting symbol. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index 927d83f8512..d9903ab9878 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,8 @@ +2012-05-22 Cary Coutant + + * symtab.cc (Symbol::should_add_dynsym_entry): Check for relocatable + object before exporting symbol. + 2012-05-21 H.J. Lu * testsuite/tls_test.cc: Include "config.h" first. diff --git a/gold/symtab.cc b/gold/symtab.cc index 1edb88da4d8..ebce5ca1d74 100644 --- a/gold/symtab.cc +++ b/gold/symtab.cc @@ -365,8 +365,9 @@ Symbol::should_add_dynsym_entry(Symbol_table* symtab) const // If the symbol was forced dynamic in a --dynamic-list file // or an --export-dynamic-symbol option, add it. - if (parameters->options().in_dynamic_list(this->name()) - || parameters->options().is_export_dynamic_symbol(this->name())) + if (!this->is_from_dynobj() + && (parameters->options().in_dynamic_list(this->name()) + || parameters->options().is_export_dynamic_symbol(this->name()))) { if (!this->is_forced_local()) return true;