aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectSource.cpp
diff options
context:
space:
mode:
authorYunQiang Su <wzssyqa@gmail.com>2024-01-17 12:11:50 +0800
committerGitHub <noreply@github.com>2024-01-16 23:11:50 -0500
commit0a64367a72f1634321f5051221f05f2f364bd882 (patch)
tree9aa17384aa5de6cd8171ecd944a1427b41358bd1 /lldb/source/Commands/CommandObjectSource.cpp
parent8371cdca12b1510d9ac6a1d13d573ced6c05402f (diff)
downloadllvm-0a64367a72f1634321f5051221f05f2f364bd882.zip
llvm-0a64367a72f1634321f5051221f05f2f364bd882.tar.gz
llvm-0a64367a72f1634321f5051221f05f2f364bd882.tar.bz2
Sanitizer/MIPS: Use $t9 for preemptible function call (#76894)
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 Fixes #74047 Co-authored-by: YunQiang Su <yunqiang.su@cipunited.com>
Diffstat (limited to 'lldb/source/Commands/CommandObjectSource.cpp')
0 files changed, 0 insertions, 0 deletions