[all-commits] [llvm/llvm-project] 54ef74: [llvm-readobj/readelf] - Don't fail dumping when u...

Georgii Rymar via All-commits all-commits at lists.llvm.org
Wed Jul 22 03:13:00 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 54ef74f738a2750dcf0dc8f97f84c20eab660394
      https://github.com/llvm/llvm-project/commit/54ef74f738a2750dcf0dc8f97f84c20eab660394
  Author: Georgii Rymar <grimar at accesssoftek.com>
  Date:   2020-07-22 (Wed, 22 Jul 2020)

  Changed paths:
    M llvm/test/tools/llvm-readobj/ELF/dyn-symbols.test
    M llvm/tools/llvm-readobj/ELFDumper.cpp

  Log Message:
  -----------
  [llvm-readobj/readelf] - Don't fail dumping when unable to read the name of the SHT_DYNSYM section.

We have an issue currently: we are trying to read the name of the SHT_DYNSYM section
very early and using `unwrapOrError` call for that.

The name is needed only for the GNU output. Because of the current logic, the tool
fails to dump the whole object when something is wrong with the name of the .dynsym section.

This patch delays reading the name and also allows it to be broken.

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




More information about the All-commits mailing list