HomePhabricator

[llvm-readelf/llvm-objdump] - Improve/refactor the implementation of…

Authored by grimar on Oct 7 2019, 3:29 AM.

Description

[llvm-readelf/llvm-objdump] - Improve/refactor the implementation of SHT_LLVM_ADDRSIG section dumping.

This patch:

  • Adds a llvm-readobj/llvm-readelf test file for SHT_LLVM_ADDRSIG sections. (we do not have any)
  • Enables dumping of SHT_LLVM_ADDRSIG with --all.
  • Changes the logic to report a warning instead of an error when something goes wrong during dumping (allows to continue dumping SHT_LLVM_ADDRSIG and other sections on error).
  • Refactors a piece of logic to a new toULEB128Array helper which might be used for GNU-style dumping implementation.

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

llvm-svn: 373890