2010-12-07 Doug Kwan <dougkwan@google.com>
authorDoug Kwan <dougkwan@google.com>
Wed, 8 Dec 2010 05:18:54 +0000 (05:18 +0000)
committerDoug Kwan <dougkwan@google.com>
Wed, 8 Dec 2010 05:18:54 +0000 (05:18 +0000)
* arm.cc (Target_arm::Scan::get_reference_flags): Treat R_ARM_PREL31
like function call relocations.

gold/ChangeLog
gold/arm.cc

index f94a26f0177ad1a2a3f2fe376b1c0f00c18663f5..7a5c36cf3daaa6b1b419f931023d5f5c0f67e621 100644 (file)
@@ -1,3 +1,8 @@
+2010-12-07  Doug Kwan  <dougkwan@google.com>
+
+       * arm.cc (Target_arm::Scan::get_reference_flags): Treat R_ARM_PREL31
+       like function call relocations.
+
 2010-12-07  Ian Lance Taylor  <iant@google.com>
 
        * archive.cc (Archive::get_elf_object_for_member): Permit
index 183bc30248101d35c073c985373ca5501ec34766..d67c4a085e321f4643d7fd9c4d7aac8e85722426 100644 (file)
@@ -7646,7 +7646,6 @@ Target_arm<big_endian>::Scan::get_reference_flags(unsigned int r_type)
     case elfcpp::R_ARM_THM_MOVW_BREL:
     case elfcpp::R_ARM_GOTOFF32:
     case elfcpp::R_ARM_GOTOFF12:
-    case elfcpp::R_ARM_PREL31:
     case elfcpp::R_ARM_SBREL31:
       return Symbol::RELATIVE_REF;
 
@@ -7659,6 +7658,10 @@ Target_arm<big_endian>::Scan::get_reference_flags(unsigned int r_type)
     case elfcpp::R_ARM_THM_JUMP6:
     case elfcpp::R_ARM_THM_JUMP11:
     case elfcpp::R_ARM_THM_JUMP8:
+    // R_ARM_PREL31 is not used to relocate call/jump instructions but
+    // in unwind tables. It may point to functions via PLTs.
+    // So we treat it like call/jump relocations above.
+    case elfcpp::R_ARM_PREL31:
       return Symbol::FUNCTION_CALL | Symbol::RELATIVE_REF;
 
     case elfcpp::R_ARM_GOT_BREL:
This page took 0.036134 seconds and 4 git commands to generate.