summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/ELFObjectFile.cpp
diff options
context:
space:
mode:
authorSunil Srivastava <sunil_srivastava@playstation.sony.com>2019-08-09 16:54:51 +0000
committerSunil Srivastava <sunil_srivastava@playstation.sony.com>2019-08-09 16:54:51 +0000
commit27f6f2f88bf90d987a32e43cd93b88e5a71fb498 (patch)
tree5bc5259b467d16b4cfa405fbcaa8db865bc8add7 /llvm/lib/Object/ELFObjectFile.cpp
parent3caf9af6c6fcb2f6ddf05de34d4809326e8dd90f (diff)
downloadbcm5719-llvm-27f6f2f88bf90d987a32e43cd93b88e5a71fb498.tar.gz
bcm5719-llvm-27f6f2f88bf90d987a32e43cd93b88e5a71fb498.zip
Print reasonable representations of type names in llvm-nm, readelf and readobj
For type values that do not have proper names, print reasonable representation in llvm-nm, llvm-readobj and llvm-readelf, matching GNU tools.s Fixes PR41713. Differential Revision: https://reviews.llvm.org/D65537 llvm-svn: 368451
Diffstat (limited to 'llvm/lib/Object/ELFObjectFile.cpp')
-rw-r--r--llvm/lib/Object/ELFObjectFile.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/llvm/lib/Object/ELFObjectFile.cpp b/llvm/lib/Object/ELFObjectFile.cpp
index c7b71579304..9945018d957 100644
--- a/llvm/lib/Object/ELFObjectFile.cpp
+++ b/llvm/lib/Object/ELFObjectFile.cpp
@@ -43,7 +43,16 @@ const EnumEntry<unsigned> llvm::object::ElfSymbolTypes[NumElfSymbolTypes] = {
{"File", "FILE", ELF::STT_FILE},
{"Common", "COMMON", ELF::STT_COMMON},
{"TLS", "TLS", ELF::STT_TLS},
- {"GNU_IFunc", "IFUNC", ELF::STT_GNU_IFUNC}};
+ {"Unknown", "<unknown>: 7", 7},
+ {"Unknown", "<unknown>: 8", 8},
+ {"Unknown", "<unknown>: 9", 9},
+ {"GNU_IFunc", "IFUNC", ELF::STT_GNU_IFUNC},
+ {"OS Specific", "<OS specific>: 11", 11},
+ {"OS Specific", "<OS specific>: 12", 12},
+ {"Proc Specific", "<processor specific>: 13", 13},
+ {"Proc Specific", "<processor specific>: 14", 14},
+ {"Proc Specific", "<processor specific>: 15", 15}
+};
ELFObjectFileBase::ELFObjectFileBase(unsigned int Type, MemoryBufferRef Source)
: ObjectFile(Type, Source) {}
OpenPOWER on IntegriCloud