[PATCH] D75756: [llvm-objdump] Teach `llvm-objdump` dump dynamic symbols.

Xing via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 12 00:52:37 PDT 2020


Higuoxing updated this revision to Diff 249846.
Higuoxing added a comment.

Addressed @grimar 's comments

- Change `DumpDynamicSymbol` to `DumpDynamic`
- I have to use this pattern, due to there doesn't exist a default constructor for `basic_symbol_iterator`

  auto I = O->symbol_begin();
  ...
  if (DumpDynamic) {
    I = ELF->dynamic_symbol_begin();
    ...
  }

- Change `WithColor::error()` to `reportWarning()`
- Change `dyn_cast` to `cast` on an ELF object.
- Modify `dynamic_symbol_begin()` according to `symbol_begin()` method.

Addressed @jhenderson 's comments

- Change test file's name
- I didn't apply `--strict-whitespace` to `FileCheck`, because there are tabs preventing me doing so (Shall we look into this later?).
- Rearrage `yaml` file blocks to line up values.
- Add more tests for ELF files with truely empty `.dynsym` section, logically empty `.dynsym` section.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75756/new/

https://reviews.llvm.org/D75756

Files:
  llvm/docs/CommandGuide/llvm-objdump.rst
  llvm/include/llvm/Object/ELFObjectFile.h
  llvm/test/tools/llvm-objdump/ELF/dynamic-symbol.test
  llvm/tools/llvm-objdump/llvm-objdump.cpp
  llvm/tools/llvm-objdump/llvm-objdump.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75756.249846.patch
Type: text/x-patch
Size: 9449 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200312/169d005d/attachment.bin>


More information about the llvm-commits mailing list