1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/test/tools
Joel Galenson 0dd9c1fcd6 [cfi-verify] Support cross-DSO
When used in cross-DSO mode, CFI will generate calls to special functions rather than trap instructions.  For example, instead of generating

if (!InlinedFastCheck(f))
  abort();
call *f

CFI generates

if (!InlinedFastCheck(f))
  __cfi_slowpath(CallSiteTypeId, f);
call *f

This patch teaches cfi-verify to recognize calls to __cfi_slowpath and abort and treat them as trap functions.

In addition to normal symbols, we also parse the dynamic relocations to handle cross-DSO calls in libraries.

We also extend cfi-verify to recognize other patterns that occur using cross-DSO.  For example, some indirect calls are not guarded by a branch to a trap but instead follow a call to __cfi_slowpath.  For example:

if (!InlinedFastCheck(f))
  call *f
else {
  __cfi_slowpath(CallSiteTypeId, f);
  call *f
}

In this case, the second call to f is not marked as protected by the current code.  We thus recognize if indirect calls directly follow a call to a function that will trap on CFI violations and treat them as protected.

We also ignore indirect calls in the PLT, since on AArch64 each entry contains an indirect call that should not be protected by CFI, and these are labeled incorrectly when debug information is not present.

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

llvm-svn: 340612
2018-08-24 15:21:58 +00:00
..
dsymutil [dsymutil] Simplify temporary file handling. 2018-07-29 14:56:15 +00:00
gold [gold] -thinlto-object-suffix-replace: don't append new suffix if path does not end with old suffix 2018-08-22 02:11:36 +00:00
llvm-ar [llvm-ar] Fix help text test. NFC. 2018-08-02 12:27:01 +00:00
llvm-cfi-verify [cfi-verify] Support cross-DSO 2018-08-24 15:21:58 +00:00
llvm-config llvm-config: Add advapi32 to --system-libs on Windows (PR36372) 2018-02-23 12:20:26 +00:00
llvm-cov [lit, python] Always add quotes around the python path in lit 2018-08-06 22:37:44 +00:00
llvm-cvtres [llvm-cvtres] Allow parameters preceded by '-' in addition to '/' 2018-05-02 21:15:13 +00:00
llvm-cxxdump
llvm-cxxfilt Add test for demangling GNU ABI tags. 2018-03-22 22:04:32 +00:00
llvm-diff Let llvm-diff correctly deal with Undef/ConstantAggregateZero/ConstantVector/IndirectBr 2018-04-12 21:28:04 +00:00
llvm-dlltool [COFF] Adjust how we flag weak externals 2018-07-20 20:48:29 +00:00
llvm-dwarfdump [DWARF] Support for .debug_addr (consumer) 2018-07-31 22:19:19 +00:00
llvm-dwp llvm-dwarfdump: automatically dump both regular and .dwo variant of sections 2017-09-13 22:09:01 +00:00
llvm-extract BlockExtractor: Don’t delete functions directly 2018-03-12 22:28:18 +00:00
llvm-isel-fuzzer Revert r326710 "Fuzzer: remove temporary files after we're done with them." 2018-03-12 13:22:12 +00:00
llvm-lib Attempt to get test/tools/llvm-lib/help.test passing on sanitizer-x86_64-linux-fast 2018-07-14 11:33:33 +00:00
llvm-lit
llvm-lto [ThinLTO] Serialize WithGlobalValueDeadStripping index flag for distributed backends 2018-02-07 04:05:59 +00:00
llvm-lto2 Fix test by allowing it to accept an upper or lower case letter as the first character. 2018-04-20 15:23:57 +00:00
llvm-mc Replace unused output filenames with /dev/null in tests 2018-07-02 18:16:44 +00:00
llvm-mca [llvm-mca] Fix PR38575: Avoid an invalid implicit truncation of a processor resource mask (an uint64_t value) to unsigned. 2018-08-15 12:53:38 +00:00
llvm-modextract
llvm-mt [llvm-mt] Use WithColor for printing errors. 2018-06-23 16:49:07 +00:00
llvm-nm nm: Add -no-weak flag for hiding weak symbols 2018-07-02 17:24:37 +00:00
llvm-objcopy [llvm-objcopy] Implement -G/--keep-global-symbol(s). 2018-08-17 22:34:48 +00:00
llvm-objdump [llvm-objdump] Label calls to the PLT. 2018-08-24 15:21:57 +00:00
llvm-opt-fuzzer Revert r326710 "Fuzzer: remove temporary files after we're done with them." 2018-03-12 13:22:12 +00:00
llvm-opt-report
llvm-pdbdump [llvm-pdbutil] Support PDBs without a DBI stream 2018-08-06 19:35:00 +00:00
llvm-profdata Make llvm-profdata show -text work as advertised in the documentation. 2018-08-24 01:34:45 +00:00
llvm-rc [llvm-rc] Add support for the optional CLASS statement for dialogs 2018-05-15 19:21:28 +00:00
llvm-readobj Add missing test file from r339799. 2018-08-16 19:29:01 +00:00
llvm-size
llvm-split Make GlobalValues with non-default visibilility dso_local. 2018-01-18 02:08:23 +00:00
llvm-strings [llvm-strings] Add support for the -a/--all options 2017-11-14 19:58:36 +00:00
llvm-symbolizer [lit, python] Always add quotes around the python path in lit 2018-08-06 22:37:44 +00:00
llvm-xray/X86 [XRay][compiler-rt] Add PID field to llvm-xray tool and add PID metadata record entry in FDR mode 2018-07-13 05:38:22 +00:00
lto Move REQUIRES: line to the top 2018-06-26 17:44:23 +00:00
obj2yaml [obj2yaml] Don't crash for input files without symbol table 2017-09-22 09:30:40 +00:00
opt-viewer [opt-viewer] Set title for the source pages 2018-02-26 21:15:50 +00:00
sancov
sanstats [sanstats] Remove a flaky test. 2017-07-13 01:36:12 +00:00
yaml2obj [yaml2obj] - Allow to use numeric sh_link (Link) value for sections. 2018-08-16 12:44:17 +00:00