mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-23 10:54:07 +08:00
557dbbac8e
Currently, almost all of the shared libraries of MIPS, rely on $t9 to get the address of current function, instead of PCREL instructions, even on MIPSr6. So we have to set $t9 properly. To get the address of preemptible function, we need the help of GOT. MIPS/O32 has .cpload, which can help to generate 3 instructions to get GOT. For __mips64, we can get GOT by: lui $t8, %hi(%neg(%gp_rel(SANITIZER_STRINGIFY(TRAMPOLINE(func))))) daddu $t8, $t8, $t9 daddiu $t8, $t8, %hi(%neg(%gp_rel(SANITIZER_STRINGIFY(TRAMPOLINE(func))))) And then get the address of __interceptor_func, and jump to it ld $t9, %got_disp(_interceptor" SANITIZER_STRINGIFY(func) ")($t8) jr $t9 Upstream-Commit: 0a64367a72f1634321f5051221f05f2f364bd882 libsanitizer * interception/interception.h (substitution_##func_name): Use macro C_ASM_TAIL_CALL. * sanitizer_common/sanitizer_asm.h: Define C_ASM_TAIL_CALL for MIPS with help of t9. |
||
---|---|---|
.. | ||
asan | ||
builtins | ||
hwasan | ||
include | ||
interception | ||
libbacktrace | ||
lsan | ||
sanitizer_common | ||
tsan | ||
ubsan | ||
acinclude.m4 | ||
aclocal.m4 | ||
ChangeLog | ||
config.h.in | ||
configure | ||
configure.ac | ||
configure.tgt | ||
HOWTO_MERGE | ||
libsanitizer.spec.in | ||
LICENSE.TXT | ||
LOCAL_PATCHES | ||
Makefile.am | ||
Makefile.in | ||
MERGE | ||
merge.sh | ||
README.gcc |
AddressSanitizer and ThreadSanitizer (https://github.com/google/sanitizers) are projects initially developed by Google Inc. Both tools consist of a compiler module and a run-time library. The sources of the run-time library for these projects are hosted at https://github.com/llvm/llvm-project in the following directories: compiler-rt/include/sanitizer compiler-rt/lib/sanitizer_common compiler-rt/lib/interception compiler-rt/lib/asan compiler-rt/lib/tsan compiler-rt/lib/lsan compiler-rt/lib/ubsan compiler-rt/lib/hwasan Trivial and urgent fixes (portability, build fixes, etc.) may go directly to the GCC tree. All non-trivial changes, functionality improvements, etc. should go through the upstream tree first and then be merged back to the GCC tree. The merges from upstream should be done with the aid of the merge.sh script; it will also update the file MERGE to contain the upstream revision we merged with.