[all-commits] [llvm/llvm-project] af3970: [llvm-readobj] Fix/improve printing WinEH unwind i...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Wed Dec 11 00:28:47 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: af39708c2d48beedc6721fe25676789cc6719f7b
      https://github.com/llvm/llvm-project/commit/af39708c2d48beedc6721fe25676789cc6719f7b
  Author: Martin Storsjö <martin at martin.st>
  Date:   2019-12-11 (Wed, 11 Dec 2019)

  Changed paths:
    A llvm/test/tools/llvm-readobj/COFF/lit.local.cfg
    A llvm/test/tools/llvm-readobj/COFF/unwind-arm64-image.yaml
    A llvm/test/tools/llvm-readobj/COFF/unwind-x86_64-image.yaml
    M llvm/tools/llvm-readobj/ARMWinEHPrinter.cpp
    M llvm/tools/llvm-readobj/Win64EHDumper.cpp

  Log Message:
  -----------
  [llvm-readobj] Fix/improve printing WinEH unwind info for linked PE images

ARMWinEHPrinter was already designed to handle linked PE images
(since d2941b43f40d), but resolving symbols didn't consistently
take the image base into account (as linked images seldom have a
symbol table, except for in MinGW setups).

Win64EHDumper wasn't really designed to handle linked images (it would
crash if executed on such a file), but a few concepts (getSymbol,
taking a virtual address instead of a relocation, and
getSectionContaining for finding the section containing a certain
virtual address) can be borrowed from ARMWinEHPrinter.

Adjust ARMWinEHPrinter to print the address of the exception handler
routine as a VA instead of an RVA, consistently with other addresses
in the same printout, and make Win64EHDumper print addresses similarly
for image cases.

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




More information about the All-commits mailing list