[all-commits] [llvm/llvm-project] d4035a: [llvm-readelf/obj] - Print section symbol names pr...

Georgii Rymar via All-commits all-commits at lists.llvm.org
Wed Sep 23 03:34:03 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d4035af2537432da41b2728829f8cd2fca9a9de8
      https://github.com/llvm/llvm-project/commit/d4035af2537432da41b2728829f8cd2fca9a9de8
  Author: Georgii Rymar <grimar at accesssoftek.com>
  Date:   2020-09-23 (Wed, 23 Sep 2020)

  Changed paths:
    M llvm/test/tools/llvm-objcopy/ELF/Inputs/compress-debug-sections.yaml
    M llvm/test/tools/llvm-readobj/ELF/reloc-zero-name-or-value.test
    M llvm/test/tools/llvm-readobj/ELF/relocation-errors.test
    M llvm/test/tools/llvm-readobj/ELF/section-symbols.test
    M llvm/tools/llvm-readobj/ELFDumper.cpp

  Log Message:
  -----------
  [llvm-readelf/obj] - Print section symbol names properly when dumping relocations.

Currently `--relocations` ignores section symbol names and always prints
section names for them. This is inconsistent with GNU readelf and with `--symbols`.

We have a code in `getFullSymbolName` (which is used for `--symbols`) which can be
reused for `getRelocationTarget` (used for `--relocations`).
With that the issue described is fixed and code becomes a bit shorter.
Also with this change we start to print more relocations (in situations when we just
showed warnings instead before) and also start to report more diagnostic warnings
(see reloc-zero-name-or-value.test).

Differential revision: https://reviews.llvm.org/D87613




More information about the All-commits mailing list