2012-03-14 Doug Kwan <dougkwan@google.com>
authorDoug Kwan <dougkwan@google.com>
Wed, 14 Mar 2012 23:07:07 +0000 (23:07 +0000)
committerDoug Kwan <dougkwan@google.com>
Wed, 14 Mar 2012 23:07:07 +0000 (23:07 +0000)
* gold/arm.cc (Target_arm::Scan::global): Generate R_ARM_GLOB_DAT
dynamic relocations for protected symbols in shared objects.

gold/ChangeLog
gold/arm.cc

index 47d15a93ed2b076f70013840ed10227bee646280..5bdda032308bf4ebeadd1d269b79d93ab0bcdf5e 100644 (file)
@@ -1,3 +1,8 @@
+2012-03-14  Doug Kwan  <dougkwan@google.com>
+
+       * 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  <iant@google.com>
 
        * resolve.cc (Symbol_table::resolve): When merging common symbols,
index bc704ccbcb42a2c6564bc56bb179ad4df7c78083..04004a68c13b199efee491896773fb8656f70d3f 100644 (file)
@@ -8314,7 +8314,9 @@ Target_arm<big_endian>::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