From eaa1607b489a91a3ccdc45c82749778a24ccb5d3 Mon Sep 17 00:00:00 2001 From: Sean Fertile Date: Fri, 13 Apr 2018 16:42:48 +0000 Subject: Add PPC64_GLINK dynamic tag. Add support for the PPC64_GLINK dynamic tag which is used in the ElfV2 abi. Differential Revision: https://reviews.llvm.org/D45574 llvm-svn: 330038 --- llvm/tools/llvm-readobj/ELFDumper.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'llvm/tools/llvm-readobj') diff --git a/llvm/tools/llvm-readobj/ELFDumper.cpp b/llvm/tools/llvm-readobj/ELFDumper.cpp index 6ad9d07f7c2..0adacf9bf5b 100644 --- a/llvm/tools/llvm-readobj/ELFDumper.cpp +++ b/llvm/tools/llvm-readobj/ELFDumper.cpp @@ -1551,6 +1551,7 @@ static const char *getTypeString(unsigned Arch, uint64_t Type) { #include "llvm/BinaryFormat/DynamicTags.def" #undef HEXAGON_DYNAMIC_TAG } + case EM_MIPS: switch (Type) { #define MIPS_DYNAMIC_TAG(name, value) \ @@ -1559,12 +1560,22 @@ static const char *getTypeString(unsigned Arch, uint64_t Type) { #include "llvm/BinaryFormat/DynamicTags.def" #undef MIPS_DYNAMIC_TAG } + + case EM_PPC64: + switch(Type) { +#define PPC64_DYNAMIC_TAG(name, value) \ + case DT_##name: \ + return #name; +#include "llvm/BinaryFormat/DynamicTags.def" +#undef PPC64_DYNAMIC_TAG + } } #undef DYNAMIC_TAG switch (Type) { // Now handle all dynamic tags except the architecture specific ones #define MIPS_DYNAMIC_TAG(name, value) #define HEXAGON_DYNAMIC_TAG(name, value) +#define PPC64_DYNAMIC_TAG(name, value) // Also ignore marker tags such as DT_HIOS (maps to DT_VERNEEDNUM), etc. #define DYNAMIC_TAG_MARKER(name, value) #define DYNAMIC_TAG(name, value) \ @@ -1574,6 +1585,7 @@ static const char *getTypeString(unsigned Arch, uint64_t Type) { #undef DYNAMIC_TAG #undef MIPS_DYNAMIC_TAG #undef HEXAGON_DYNAMIC_TAG +#undef PPC64_DYNAMIC_TAG #undef DYNAMIC_TAG_MARKER default: return "unknown"; } -- cgit v1.2.3