[compiler-rt] 120e043 - [ASan] Added back @PLT to __asan_report_* calls to avoid compile errors.

Kirill Stoimenov via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 10 13:43:15 PST 2022


Author: Kirill Stoimenov
Date: 2022-03-10T21:43:00Z
New Revision: 120e0434bcda3c1ed00e77ded0de9690dad2c347

URL: https://github.com/llvm/llvm-project/commit/120e0434bcda3c1ed00e77ded0de9690dad2c347
DIFF: https://github.com/llvm/llvm-project/commit/120e0434bcda3c1ed00e77ded0de9690dad2c347.diff

LOG: [ASan] Added back @PLT to __asan_report_* calls to avoid compile errors.

Reviewed By: vitalybuka

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

Added: 
    

Modified: 
    compiler-rt/lib/asan/asan_rtl_x86_64.S

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/asan/asan_rtl_x86_64.S b/compiler-rt/lib/asan/asan_rtl_x86_64.S
index 92376f5b9a78f..d27db745ed674 100644
--- a/compiler-rt/lib/asan/asan_rtl_x86_64.S
+++ b/compiler-rt/lib/asan/asan_rtl_x86_64.S
@@ -42,7 +42,7 @@ CLABEL(reg, op, 1, i): ;\
         pop    %rcx ;\
         jl     RLABEL(reg, op, 1, i);\
         mov    %##reg,%rdi ;\
-        jmp    __asan_report_##op##1 ;\
+        jmp    __asan_report_##op##1 at PLT ;\
 
 #define ASAN_MEMORY_ACCESS_EXTRA_CHECK_2(reg, op, i) \
 CLABEL(reg, op, 2, i): ;\
@@ -54,7 +54,7 @@ CLABEL(reg, op, 2, i): ;\
         pop    %rcx ;\
         jl     RLABEL(reg, op, 2, i);\
         mov    %##reg,%rdi ;\
-        jmp    __asan_report_##op##2 ;\
+        jmp    __asan_report_##op##2 at PLT ;\
 
 #define ASAN_MEMORY_ACCESS_EXTRA_CHECK_4(reg, op, i) \
 CLABEL(reg, op, 4, i): ;\
@@ -66,7 +66,7 @@ CLABEL(reg, op, 4, i): ;\
         pop    %rcx ;\
         jl     RLABEL(reg, op, 4, i);\
         mov    %##reg,%rdi ;\
-        jmp    __asan_report_##op##4 ;\
+        jmp    __asan_report_##op##4 at PLT ;\
 
 #define ASAN_MEMORY_ACCESS_CALLBACK_ADD_1(reg, op) \
 BEGINF(reg, op, 1, add) ;\
@@ -97,7 +97,7 @@ ENDF
 #define ASAN_MEMORY_ACCESS_FAIL(reg, op, s, i) \
 FLABEL(reg, op, s, i): ;\
         mov    %##reg,%rdi ;\
-        jmp    __asan_report_##op##s##;\
+        jmp    __asan_report_##op##s at PLT;\
 
 #define ASAN_MEMORY_ACCESS_CALLBACK_ADD_8(reg, op) \
 BEGINF(reg, op, 8, add) ;\


        


More information about the llvm-commits mailing list