From fa40b62ad433db232f60443bbe9d222acab81cad Mon Sep 17 00:00:00 2001 From: Doug Kwan Date: Wed, 14 Mar 2012 23:07:07 +0000 Subject: [PATCH] 2012-03-14 Doug Kwan * gold/arm.cc (Target_arm::Scan::global): Generate R_ARM_GLOB_DAT dynamic relocations for protected symbols in shared objects. --- gold/ChangeLog | 5 +++++ gold/arm.cc | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gold/ChangeLog b/gold/ChangeLog index 47d15a93ed2..5bdda032308 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,8 @@ +2012-03-14 Doug Kwan + + * gold/arm.cc (Target_arm::Scan::global): Generate R_ARM_GLOB_DAT + dynamic relocations for protected symbols in shared objects. + 2012-03-13 Ian Lance Taylor * resolve.cc (Symbol_table::resolve): When merging common symbols, diff --git a/gold/arm.cc b/gold/arm.cc index bc704ccbcb4..04004a68c13 100644 --- a/gold/arm.cc +++ b/gold/arm.cc @@ -8314,7 +8314,9 @@ Target_arm::Scan::global(Symbol_table* symtab, Reloc_section* rel_dyn = target->rel_dyn_section(layout); if (gsym->is_from_dynobj() || gsym->is_undefined() - || gsym->is_preemptible()) + || gsym->is_preemptible() + || (gsym->visibility() == elfcpp::STV_PROTECTED + && parameters->options().shared())) got->add_global_with_rel(gsym, GOT_TYPE_STANDARD, rel_dyn, elfcpp::R_ARM_GLOB_DAT); else -- 2.30.2