1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/tools
Martin Storsjö 3bf0debbff Reapply [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.

Relanded with a format string fix in the formatSymbol function; one
can't use %X as format string for an uint64_t. That bug has been
present since this code was added in e6971cab306cd.

Differential Revision: https://reviews.llvm.org/D100305
2021-04-30 09:51:23 +03:00
..
bugpoint Avoid shuffle self-assignment in EXPENSIVE_CHECKS builds 2021-03-10 11:17:34 +00:00
bugpoint-passes
dsymutil [dsymutil] Add flag to force a static variable to keep its enclosing function 2021-04-28 11:33:04 -07:00
gold [gold] Match lld WPD behavior for shared library symbols and add test 2021-02-17 15:28:49 -08:00
llc [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
lli [lli] Honor the --entry-function flag in orc and orc-lazy modes. 2021-04-13 11:33:24 -07:00
llvm-ar [NFC] Reordering parameters in getFile and getFileOrSTDIN 2021-03-25 09:47:49 -04:00
llvm-as
llvm-as-fuzzer
llvm-bcanalyzer
llvm-c-test LLVM-C: Allow LLVM{Get/Set}Alignment on an atomicrmw/cmpxchg instruction. 2021-02-12 18:31:18 -05:00
llvm-cat
llvm-cfi-verify [llvm-cfi-verify] Set UseSymbolTable to false 2021-02-10 09:44:13 -08:00
llvm-config
llvm-cov [Support] Don't include VirtualFileSystem.h in CommandLine.h 2021-04-21 10:19:01 -04:00
llvm-cvtres [llvm-cvtres] Reduce the set of dependencies of llvm-cvtres. NFC. 2021-04-21 11:50:10 +03:00
llvm-cxxdump
llvm-cxxfilt
llvm-cxxmap [Support] Don't include VirtualFileSystem.h in CommandLine.h 2021-04-21 10:19:01 -04:00
llvm-diff
llvm-dis [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
llvm-dwarfdump [llvm-dwarfdump] Fix split-dwarf bug in stats for inlined var loc cov 2021-04-26 01:56:15 -07:00
llvm-dwp [NFC] Fix "not used" warning 2021-04-26 22:09:23 -07:00
llvm-elfabi
llvm-exegesis [Support] Don't include VirtualFileSystem.h in CommandLine.h 2021-04-21 10:19:01 -04:00
llvm-extract
llvm-go
llvm-gsymutil
llvm-ifs [SystemZ][z/OS] Add IsText Argument to GetFile and GetFileOrSTDIN 2021-04-16 10:08:36 -04:00
llvm-isel-fuzzer
llvm-itanium-demangle-fuzzer
llvm-jitlink [Support] Don't include VirtualFileSystem.h in CommandLine.h 2021-04-21 10:19:01 -04:00
llvm-jitlistener
llvm-libtool-darwin [Support] Don't include VirtualFileSystem.h in CommandLine.h 2021-04-21 10:19:01 -04:00
llvm-link NFC: Run clang-format over llvm-link. 2021-04-28 14:33:00 -07:00
llvm-lipo [TextAPI] move source code files out of subdirectory, NFC 2021-04-05 10:24:42 -07:00
llvm-lto Recommit "[LTO] Use lto::backend for code generation." 2021-02-15 10:05:42 +00:00
llvm-lto2 Don't use $ as suffix for symbol names in ThinLTOBitcodeWriter and other places 2021-03-29 13:03:52 +02:00
llvm-mc [SystemZ][z/OS] Add IsText Argument to GetFile and GetFileOrSTDIN 2021-04-16 10:08:36 -04:00
llvm-mc-assemble-fuzzer
llvm-mc-disassemble-fuzzer
llvm-mca Fix the triple used in llvm-mca. 2021-04-22 14:27:09 -04:00
llvm-microsoft-demangle-fuzzer
llvm-ml [ms] [llvm-ml] Accept /WX to signal that warnings should be fatal. 2021-04-02 15:13:20 -04:00
llvm-modextract
llvm-mt
llvm-nm [llvm-symbolizer][llvm-nm] Fix AArch64 and ARM mapping symbols handling. 2021-03-23 14:17:12 +01:00
llvm-objcopy [llvm-objcopy][MachO] Add support for LC_THREAD/LC_UNIXTHREAD 2021-04-28 16:29:33 -07:00
llvm-objdump [llvm-objdump] Fix dumping dynamic relative relocations for SHT_REL 2021-04-28 12:23:00 +01:00
llvm-opt-fuzzer [FuzzMutate] Add mutator to modify instruction flags. 2021-01-23 19:05:20 +00:00
llvm-opt-report [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
llvm-pdbutil Removed redundant code. 2021-04-07 05:37:46 +04:00
llvm-profdata [CSSPGO][llvm-profdata] Support trimming cold context when merging profiles 2021-04-22 00:42:37 -07:00
llvm-profgen [CSSPGO][llvm-profdata] Support trimming cold context when merging profiles 2021-04-22 00:42:37 -07:00
llvm-rc [llvm-rc] Add a GNU windres-like frontend to llvm-rc 2021-04-26 22:04:29 +03:00
llvm-readobj Reapply [llvm-readobj] [ARMWinEH] Fix handling of relocations and symbol offsets 2021-04-30 09:51:23 +03:00
llvm-reduce [llvm-reduce] Remove unwanted module inline asm 2021-04-06 09:35:37 -07:00
llvm-rtdyld [Support] Don't include VirtualFileSystem.h in CommandLine.h 2021-04-21 10:19:01 -04:00
llvm-shlib Revert "llvm-shlib: Create object libraries for each component and link against them" 2021-04-05 10:46:19 -07:00
llvm-size
llvm-special-case-list-fuzzer
llvm-split [LTO] Update splitCodeGen to take a reference to the module. (NFC) 2021-01-29 11:53:11 +00:00
llvm-stress Avoid shuffle self-assignment in EXPENSIVE_CHECKS builds 2021-03-10 11:17:34 +00:00
llvm-strings
llvm-symbolizer [llvm-symbolizer] remove unused variable 2021-04-14 09:24:45 -04:00
llvm-undname
llvm-xray [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
llvm-yaml-numeric-parser-fuzzer [llvm] NFC: Cleanup llvm-yaml-numeric-parser-fuzzer 2021-02-15 14:52:53 +01:00
llvm-yaml-parser-fuzzer
lto [LTO][Legacy] Decouple option parsing from LTOCodeGenerator 2021-03-31 16:43:26 +00:00
msbuild
obj2yaml [NFC] Reordering parameters in getFile and getFileOrSTDIN 2021-03-25 09:47:49 -04:00
opt Revert "[X86] Support AMX fast register allocation" 2021-04-29 18:56:33 +02:00
opt-viewer
remarks-shlib
sancov
sanstats [NFC] Reordering parameters in getFile and getFileOrSTDIN 2021-03-25 09:47:49 -04:00
split-file [Support] Don't include VirtualFileSystem.h in CommandLine.h 2021-04-21 10:19:01 -04:00
verify-uselistorder [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
vfabi-demangle-fuzzer
xcode-toolchain
yaml2obj
CMakeLists.txt