llvm-project/llvm/tools/llvm-objdump
Matt Davis 82937e44bd [ELF] Return the section name when calling getSymbolName on a section symbol.
Summary:
Previously, llvm-nm would report symbols for .debug and .note sections as: '?' with an empty  section name:

```
00000000 ?
00000000 ?
...
```

With this patch the output more closely resembles GNU nm:
```
00000000 N .debug_abbrev
00000000 n .note.GNU-stack
...
```

This patch calls `getSectionName` for sections that belong to symbols of type `ELF::STT_SECTION`, which returns the name of the section from the section string table.

Reviewers: Bigcheese, davide, jhenderson

Reviewed By: davide, jhenderson

Subscribers: rupprecht, jhenderson, llvm-commits

Differential Revision: https://reviews.llvm.org/D57105

llvm-svn: 352785
2019-01-31 19:42:21 +00:00
..
CMakeLists.txt Fix debug build by adding missing dependencies on libBinaryFormat 2018-05-15 00:46:43 +00:00
COFFDump.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ELFDump.cpp [llvm-objdump] - Print LMAs when dumping section headers. 2019-01-28 14:11:35 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MachODump.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
WasmDump.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-objdump.cpp [ELF] Return the section name when calling getSymbolName on a section symbol. 2019-01-31 19:42:21 +00:00
llvm-objdump.h [llvm-objdump] - Print LMAs when dumping section headers. 2019-01-28 14:11:35 +00:00