[compiler-rt] d6aa3aa - [ASan] Added .section statement to each function so they can be removed by --gc-sections.

Kirill Stoimenov via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 16 10:35:27 PDT 2022


Author: Kirill Stoimenov
Date: 2022-03-16T17:35:15Z
New Revision: d6aa3aa2da644d9ad7dbc876ea42d33cfccae23e

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

LOG: [ASan] Added .section statement to each function so they can be removed by --gc-sections.

Reviewed By: MaskRay

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

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 9dcb8627ba281..e5e5fc440da5b 100644
--- a/compiler-rt/lib/asan/asan_rtl_x86_64.S
+++ b/compiler-rt/lib/asan/asan_rtl_x86_64.S
@@ -4,7 +4,6 @@
 #if defined(__x86_64__)
 #include "sanitizer_common/sanitizer_platform.h"
 
-.section .text
 .file "asan_rtl_x86_64.S"
 
 #define NAME(n, reg, op, s, i) n##_##op##_##i##_##s##_##reg
@@ -15,6 +14,7 @@
 #define FLABEL(reg, op, s, i) NAME(.fail, reg, op, s, i)
 
 #define BEGINF(reg, op, s, i) \
+.section .text.FNAME(reg, op, s, i),"ax", at progbits ;\
 .globl  FNAME(reg, op, s, i) ;\
 ASM_TYPE_FUNCTION(FNAME(reg, op, s, i)) ;\
 .cfi_startproc ;\


        


More information about the llvm-commits mailing list