summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/ELF.cpp
diff options
context:
space:
mode:
authorAlex Bradbury <asb@lowrisc.org>2016-11-01 16:59:37 +0000
committerAlex Bradbury <asb@lowrisc.org>2016-11-01 16:59:37 +0000
commit1524f62b975523ce2bec5ad82873303e8e2e0dbc (patch)
tree6d252bd5dce155172b0a1453ff5f8f1fbd9cd8b2 /llvm/lib/Object/ELF.cpp
parentb6e784a240fa3f62874c457afa43be37278cfa2d (diff)
downloadbcm5719-llvm-1524f62b975523ce2bec5ad82873303e8e2e0dbc.tar.gz
bcm5719-llvm-1524f62b975523ce2bec5ad82873303e8e2e0dbc.zip
[RISCV] Add RISC-V ELF defines
Add the necessary definitions for RISC-V ELF files, including relocs. Also make necessary trivial change to ELFYaml, llvm-objdump, and llvm-readobj in order to work with RISC-V ELFs. Differential Revision: https://reviews.llvm.org/D23557 llvm-svn: 285708
Diffstat (limited to 'llvm/lib/Object/ELF.cpp')
-rw-r--r--llvm/lib/Object/ELF.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Object/ELF.cpp b/llvm/lib/Object/ELF.cpp
index 4d37a298632..23682e1fabf 100644
--- a/llvm/lib/Object/ELF.cpp
+++ b/llvm/lib/Object/ELF.cpp
@@ -89,6 +89,13 @@ StringRef getELFRelocationTypeName(uint32_t Machine, uint32_t Type) {
break;
}
break;
+ case ELF::EM_RISCV:
+ switch (Type) {
+#include "llvm/Support/ELFRelocs/RISCV.def"
+ default:
+ break;
+ }
+ break;
case ELF::EM_S390:
switch (Type) {
#include "llvm/Support/ELFRelocs/SystemZ.def"
OpenPOWER on IntegriCloud