aboutsummaryrefslogtreecommitdiff
path: root/gold
diff options
context:
space:
mode:
authorDoug Kwan <dougkwan@google.com>2010-12-08 05:18:54 +0000
committerDoug Kwan <dougkwan@google.com>2010-12-08 05:18:54 +0000
commit017257f8db5c860dd46d7ba45fa867a3a6a7c49e (patch)
tree6ede2423b6d30e8ed03585a877fb45bacd5e5303 /gold
parentdbcf63876c7d40283e7a6b9eed7e89f0ac1ed22c (diff)
downloadgdb-017257f8db5c860dd46d7ba45fa867a3a6a7c49e.zip
gdb-017257f8db5c860dd46d7ba45fa867a3a6a7c49e.tar.gz
gdb-017257f8db5c860dd46d7ba45fa867a3a6a7c49e.tar.bz2
2010-12-07 Doug Kwan <dougkwan@google.com>
* arm.cc (Target_arm::Scan::get_reference_flags): Treat R_ARM_PREL31 like function call relocations.
Diffstat (limited to 'gold')
-rw-r--r--gold/ChangeLog5
-rw-r--r--gold/arm.cc5
2 files changed, 9 insertions, 1 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index f94a26f..7a5c36c 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -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
diff --git a/gold/arm.cc b/gold/arm.cc
index 183bc30..d67c4a0 100644
--- a/gold/arm.cc
+++ b/gold/arm.cc
@@ -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: