aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-10-20 04:33:21 +0000
committerIan Lance Taylor <iant@google.com>2007-10-20 04:33:21 +0000
commitf389a824b8b088c70212bd90203fbb0563de8f06 (patch)
tree0bda0007762aec6103f64361a4d160a7426f1967
parentdf2efe713a06aa0d0aa7dcd7850d97ea9fff85ec (diff)
downloadgdb-f389a824b8b088c70212bd90203fbb0563de8f06.zip
gdb-f389a824b8b088c70212bd90203fbb0563de8f06.tar.gz
gdb-f389a824b8b088c70212bd90203fbb0563de8f06.tar.bz2
From Craig Silverstein: handle PLT32 relocs against local symbols for
x86_64.
-rw-r--r--gold/x86_64.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/gold/x86_64.cc b/gold/x86_64.cc
index c736350..b6a8a4a 100644
--- a/gold/x86_64.cc
+++ b/gold/x86_64.cc
@@ -736,6 +736,11 @@ Target_x86_64::Scan::local(const General_options&,
case elfcpp::R_X86_64_PC8:
break;
+ case elfcpp::R_X86_64_PLT32:
+ // Since we know this is a local symbol, we can handle this as a
+ // PC32 reloc.
+ break;
+
case elfcpp::R_X86_64_GOTPC32: // TODO(csilvers): correct?
case elfcpp::R_X86_64_GOTOFF64:
case elfcpp::R_X86_64_GOTPC64: // TODO(csilvers): correct?
@@ -832,7 +837,6 @@ Target_x86_64::Scan::local(const General_options&,
break;
case elfcpp::R_X86_64_GOTPLT64:
- case elfcpp::R_X86_64_PLT32:
case elfcpp::R_X86_64_SIZE32: // TODO(csilvers): correct?
case elfcpp::R_X86_64_SIZE64: // TODO(csilvers): correct?
default:
@@ -1237,7 +1241,8 @@ Target_x86_64::Relocate::relocate(const Relocate_info<64, false>* relinfo,
break;
case elfcpp::R_X86_64_PLT32:
- gold_assert(gsym->has_plt_offset()
+ gold_assert(gsym == NULL
+ || gsym->has_plt_offset()
|| gsym->final_value_is_known());
Relocate_functions<64, false>::pcrela32(view, object, psymval, addend,
address);