1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00
llvm-mirror/tools/llvm-readobj
Martin Storsjö cc34f77833 [llvm-readobj] [ARMWinEH] Fix handling of relocations and symbol offsets
When looking up data referenced from pdata/xdata structures, the
referenced data can be found in two different ways:
- For an unrelocated object file, it's located via a relocation
- For a relocated, linked image, the data is referenced with an
  (image relative) absolute address

For the latter case, the absolute address can optionally be
described with a symbol.

For the case of an object file, there's two offsets involved; one
immediate offset encoded in the data location that is modified by
the relocation, and a section offset in the symbol.

Previously, for the ExceptionRecord field, we printed the offset
from the symbol (only) but used the immediate offset ignoring
the symbol's address (using only the symbol's section) for printing
the exception data.

Add a helper method for doing the lookup and address calculation,
for simplifying the calling code and making all the cases consistent.

This addresses an existing FIXME comment, fixing printing of the
exception data for cases where relocations point at individual
symbols in the xdata section (which is what MSVC generates) instead of
all relocations pointing at the start of the xdata section (which is
what LLVM generates).

This also fixes printing of the function name for packed entries in
linked images.

Differential Revision: https://reviews.llvm.org/D100305
2021-04-29 23:35:10 +03:00
..
ARMEHABIPrinter.h [llvm-readobj][ARM] - Improve support of printing unwind (-u) information for non-relocatable objects. 2020-09-30 11:43:34 +03:00
ARMWinEHPrinter.cpp [llvm-readobj] [ARMWinEH] Fix handling of relocations and symbol offsets 2021-04-29 23:35:10 +03:00
ARMWinEHPrinter.h [llvm-readobj] [ARMWinEH] Fix handling of relocations and symbol offsets 2021-04-29 23:35:10 +03:00
CMakeLists.txt [llvm-readobj] - Remove Error.cpp,.h and drop dependencies in the code. 2020-09-01 16:46:17 +03:00
COFFDumper.cpp [LLD] Implement /guard:[no]ehcont 2021-04-14 15:06:49 +08:00
COFFImportDumper.cpp [Object] Change SymbolicFile::printSymbolName to use Error 2019-05-10 09:59:04 +00:00
DwarfCFIEHPrinter.h [lib/Object, tools] - Make ELFObjectFile::getELFFile return reference. 2020-12-04 16:02:29 +03:00
ELFDumper.cpp [yaml2obj/obj2yaml/llvm-readobj] Support printing and parsing AVR-specific e_flags 2021-04-15 15:54:28 +02:00
llvm-readobj.cpp [NFC] Reordering parameters in getFile and getFileOrSTDIN 2021-03-25 09:47:49 -04:00
llvm-readobj.h [llvm-readobj] - Remove reportError(std::error_code EC, StringRef Input) helper. 2019-08-22 08:56:24 +00:00
MachODumper.cpp [llvm-readelf/obj] - Move unique warning handling logic to the ObjDumper. 2020-12-01 10:53:00 +03:00
ObjDumper.cpp [llvm-readobj] - Introduce ObjDumper::reportUniqueWarning(const Twine &Msg). 2020-12-01 12:36:44 +03:00
ObjDumper.h [llvm-readelf] Support dumping the BB address map section with --bb-addr-map. 2021-03-08 16:20:11 -08:00
StackMapPrinter.h [StackMaps] Add location size to llvm-readobj -stackmap output 2019-04-13 03:08:45 +00:00
WasmDumper.cpp [WebAssembly] Rename WasmLimits::Initial to ::Minimum. NFC. 2021-03-24 09:10:11 +01:00
Win64EHDumper.cpp [llvm-readobj] - Remove Error.cpp,.h and drop dependencies in the code. 2020-09-01 16:46:17 +03:00
Win64EHDumper.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
WindowsResourceDumper.cpp [llvm-readobj] - Remove Error.cpp,.h and drop dependencies in the code. 2020-09-01 16:46:17 +03:00
WindowsResourceDumper.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCOFFDumper.cpp [AIX][TLS] Add support for TLS variables to XCOFF object writer 2021-04-06 10:46:07 -05:00