summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/ELF.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-09-06 00:53:28 +0000
committerFangrui Song <maskray@google.com>2019-09-06 00:53:28 +0000
commit9d2504b6d805c08f333143e27b2f09a9e839554a (patch)
treec460bce40620d21bbd5e337aeb4c733a2d9bfc98 /llvm/lib/Object/ELF.cpp
parentee093ba5c9b535d526b6d4e8f81099794598207e (diff)
downloadbcm5719-llvm-9d2504b6d805c08f333143e27b2f09a9e839554a.tar.gz
bcm5719-llvm-9d2504b6d805c08f333143e27b2f09a9e839554a.zip
[llvm-readobj][yaml2obj] Support SHT_LLVM_SYMPART, SHT_LLVM_PART_EHDR and SHT_LLVM_PART_PHDR
See http://lists.llvm.org/pipermail/llvm-dev/2019-February/130583.html and D60242 for the lld partition feature. This patch: * Teaches yaml2obj to parse the 3 section types. * Teaches llvm-readobj/llvm-readelf to dump the 3 section types. There is no test for SHT_LLVM_DEPENDENT_LIBRARIES in llvm-readobj. Add it as well. Reviewed By: thakis Differential Revision: https://reviews.llvm.org/D67228 llvm-svn: 371157
Diffstat (limited to 'llvm/lib/Object/ELF.cpp')
-rw-r--r--llvm/lib/Object/ELF.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Object/ELF.cpp b/llvm/lib/Object/ELF.cpp
index 8660b1a64bd..d491288579d 100644
--- a/llvm/lib/Object/ELF.cpp
+++ b/llvm/lib/Object/ELF.cpp
@@ -255,6 +255,8 @@ StringRef llvm::object::getELFSectionTypeName(uint32_t Machine, unsigned Type) {
STRINGIFY_ENUM_CASE(ELF, SHT_LLVM_ADDRSIG);
STRINGIFY_ENUM_CASE(ELF, SHT_LLVM_DEPENDENT_LIBRARIES);
STRINGIFY_ENUM_CASE(ELF, SHT_LLVM_SYMPART);
+ STRINGIFY_ENUM_CASE(ELF, SHT_LLVM_PART_EHDR);
+ STRINGIFY_ENUM_CASE(ELF, SHT_LLVM_PART_PHDR);
STRINGIFY_ENUM_CASE(ELF, SHT_GNU_ATTRIBUTES);
STRINGIFY_ENUM_CASE(ELF, SHT_GNU_HASH);
STRINGIFY_ENUM_CASE(ELF, SHT_GNU_verdef);
OpenPOWER on IntegriCloud