Skip to content

Commit

Permalink
Use modern @got syntax in tsan assembly, instead of old style non_laz…
Browse files Browse the repository at this point in the history
…y_pointers. NFC

Reviewed By: kubamracek, yln, wrotki, dvyukov

Differential Revision: https://reviews.llvm.org/D143959
  • Loading branch information
cooperp committed Feb 20, 2023
1 parent 0b336e9 commit 522d9f5
Showing 1 changed file with 6 additions and 31 deletions.
37 changes: 6 additions & 31 deletions compiler-rt/lib/tsan/rtl/tsan_rtl_aarch64.S
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,6 @@

#include "sanitizer_common/sanitizer_asm.h"

#if defined(__APPLE__)
.align 2

.section __DATA,__nl_symbol_ptr,non_lazy_symbol_pointers
.long _setjmp$non_lazy_ptr
_setjmp$non_lazy_ptr:
.indirect_symbol _setjmp
.long 0

.section __DATA,__nl_symbol_ptr,non_lazy_symbol_pointers
.long __setjmp$non_lazy_ptr
__setjmp$non_lazy_ptr:
.indirect_symbol __setjmp
.long 0

.section __DATA,__nl_symbol_ptr,non_lazy_symbol_pointers
.long _sigsetjmp$non_lazy_ptr
_sigsetjmp$non_lazy_ptr:
.indirect_symbol _sigsetjmp
.long 0
#endif

#if !defined(__APPLE__)
.section .text
#else
Expand Down Expand Up @@ -75,9 +53,8 @@ ASM_SYMBOL_INTERCEPTOR(setjmp):
ldr x1, [x1, #:got_lo12:_ZN14__interception11real_setjmpE]
ldr x1, [x1]
#else
adrp x1, _setjmp$non_lazy_ptr@page
add x1, x1, _setjmp$non_lazy_ptr@pageoff
ldr x1, [x1]
adrp x1, _setjmp@GOTPAGE
ldr x1, [x1, _setjmp@GOTPAGEOFF]
#endif
br x1

Expand Down Expand Up @@ -126,9 +103,8 @@ ASM_SYMBOL_INTERCEPTOR(_setjmp):
ldr x1, [x1, #:got_lo12:_ZN14__interception12real__setjmpE]
ldr x1, [x1]
#else
adrp x1, __setjmp$non_lazy_ptr@page
add x1, x1, __setjmp$non_lazy_ptr@pageoff
ldr x1, [x1]
adrp x1, __setjmp@GOTPAGE
ldr x1, [x1, __setjmp@GOTPAGEOFF]
#endif
br x1

Expand Down Expand Up @@ -179,9 +155,8 @@ ASM_SYMBOL_INTERCEPTOR(sigsetjmp):
ldr x2, [x2, #:got_lo12:_ZN14__interception14real_sigsetjmpE]
ldr x2, [x2]
#else
adrp x2, _sigsetjmp$non_lazy_ptr@page
add x2, x2, _sigsetjmp$non_lazy_ptr@pageoff
ldr x2, [x2]
adrp x2, _sigsetjmp@GOTPAGE
ldr x2, [x2, _sigsetjmp@GOTPAGEOFF]
#endif
br x2
CFI_ENDPROC
Expand Down

0 comments on commit 522d9f5

Please sign in to comment.