summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-04-03 02:27:00 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-04-03 02:27:00 +0000
commit2f913e3c6c3a42c0055df5cc6007e0064df3dec0 (patch)
tree0bbd8a8b521bfa501ea8acd2160e2dc7b1e6418a
parentee2bf5b6077315359af175c7ee5ae580002637a3 (diff)
downloadllvm-2f913e3c6c3a42c0055df5cc6007e0064df3dec0.tar.gz
llvm-2f913e3c6c3a42c0055df5cc6007e0064df3dec0.tar.bz2
llvm-2f913e3c6c3a42c0055df5cc6007e0064df3dec0.tar.xz
Add support for the R_ARM_ABS32 relocation.
This should bring the arm buildbots back. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205502 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Object/RelocVisitor.h13
-rw-r--r--test/DebugInfo/Inputs/arm-relocs.elf-armbin0 -> 3012 bytes
-rw-r--r--test/DebugInfo/arm-relocs.test5
3 files changed, 18 insertions, 0 deletions
diff --git a/include/llvm/Object/RelocVisitor.h b/include/llvm/Object/RelocVisitor.h
index c72db2ce41..a3aaf17f1d 100644
--- a/include/llvm/Object/RelocVisitor.h
+++ b/include/llvm/Object/RelocVisitor.h
@@ -153,6 +153,14 @@ public:
HasError = true;
return RelocToApply();
}
+ } else if (FileFormat == "ELF32-arm") {
+ switch (RelocType) {
+ default:
+ HasError = true;
+ return RelocToApply();
+ case llvm::ELF::R_ARM_ABS32:
+ return visitELF_ARM_ABS32(R, Value);
+ }
}
HasError = true;
return RelocToApply();
@@ -325,6 +333,11 @@ private:
return RelocToApply(Value + Addend, 8);
}
+ RelocToApply visitELF_ARM_ABS32(RelocationRef R, uint64_t Value) {
+ int64_t Addend = getAddend32LE(R);
+ return RelocToApply(Value + Addend, 4);
+ }
+
};
}
diff --git a/test/DebugInfo/Inputs/arm-relocs.elf-arm b/test/DebugInfo/Inputs/arm-relocs.elf-arm
new file mode 100644
index 0000000000..4864c36256
--- /dev/null
+++ b/test/DebugInfo/Inputs/arm-relocs.elf-arm
Binary files differ
diff --git a/test/DebugInfo/arm-relocs.test b/test/DebugInfo/arm-relocs.test
new file mode 100644
index 0000000000..13e11f7043
--- /dev/null
+++ b/test/DebugInfo/arm-relocs.test
@@ -0,0 +1,5 @@
+RUN: llvm-dwarfdump %p/Inputs/arm-relocs.elf-arm | FileCheck %s
+
+; CHECK: debug_info contents
+; CHECK: DW_TAG_enumeration_type
+; CHECK-NEXT: DW_AT_name{{.*}} = "e1"