[PATCH] D71303: [llvm-readobj] Fix/improve printing WinEH unwind info for linked PE images
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 10 14:18:58 PST 2019
mstorsjo created this revision.
mstorsjo added reviewers: rnk, efriedma, ssijaric.
Herald added subscribers: seiya, rupprecht, kristof.beyls.
Herald added a reviewer: jhenderson.
Herald added a project: LLVM.
mstorsjo edited the summary of this revision.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D71303
Files:
llvm/test/tools/llvm-readobj/COFF/unwind-arm64-image.yaml
llvm/test/tools/llvm-readobj/COFF/unwind-x86_64-image.yaml
llvm/tools/llvm-readobj/ARMWinEHPrinter.cpp
llvm/tools/llvm-readobj/Win64EHDumper.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71303.233194.patch
Type: text/x-patch
Size: 17260 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191210/89010792/attachment.bin>
More information about the llvm-commits
mailing list