summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/ELF.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Object/ELF.cpp')
-rw-r--r--llvm/lib/Object/ELF.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Object/ELF.cpp b/llvm/lib/Object/ELF.cpp
index 314be34ef59..dd8f3a9f331 100644
--- a/llvm/lib/Object/ELF.cpp
+++ b/llvm/lib/Object/ELF.cpp
@@ -424,7 +424,7 @@ ELFFile<ELFT>::android_relas(const Elf_Shdr *Sec) const {
}
template <class ELFT>
-const char *ELFFile<ELFT>::getDynamicTagAsString(unsigned Arch,
+std::string ELFFile<ELFT>::getDynamicTagAsString(unsigned Arch,
uint64_t Type) const {
#define DYNAMIC_STRINGIFY_ENUM(tag, value) \
case value: \
@@ -470,12 +470,12 @@ const char *ELFFile<ELFT>::getDynamicTagAsString(unsigned Arch,
#undef DYNAMIC_TAG_MARKER
#undef DYNAMIC_STRINGIFY_ENUM
default:
- return "unknown";
+ return "<unknown:>0x" + utohexstr(Type, true);
}
}
template <class ELFT>
-const char *ELFFile<ELFT>::getDynamicTagAsString(uint64_t Type) const {
+std::string ELFFile<ELFT>::getDynamicTagAsString(uint64_t Type) const {
return getDynamicTagAsString(getHeader()->e_machine, Type);
}
OpenPOWER on IntegriCloud