From b24fdbf5e047e534ca9783af40dbefdf46f8bd0c Mon Sep 17 00:00:00 2001 From: Cary Coutant Date: Tue, 22 May 2012 23:50:52 +0000 Subject: [PATCH] gold/ * symtab.cc (Symbol::should_add_dynsym_entry): Check for relocatable object before exporting symbol. --- gold/ChangeLog | 5 +++++ gold/symtab.cc | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gold/ChangeLog b/gold/ChangeLog index 927d83f851..d9903ab987 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 1edb88da4d..ebce5ca1d7 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;