[compiler-rt] 108daf7 - Check for aarch64 when not using .init_arrays

Sterling Augustine via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 2 10:18:32 PST 2020


Author: Sterling Augustine
Date: 2020-01-02T10:10:49-08:00
New Revision: 108daf76118e5b97696f58386d0b48d4b858ffad

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

LOG: Check for aarch64 when not using .init_arrays

Reviewers: vvereschaka

Subscribers: kristof.beyls, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

Added: 
    

Modified: 
    compiler-rt/lib/crt/crtbegin.c

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/crt/crtbegin.c b/compiler-rt/lib/crt/crtbegin.c
index b2b62798d033..24bea1a2c3a7 100644
--- a/compiler-rt/lib/crt/crtbegin.c
+++ b/compiler-rt/lib/crt/crtbegin.c
@@ -52,7 +52,7 @@ __attribute__((section(".init_array"),
 __asm__(".pushsection .init,\"ax\", at progbits\n\t"
     "call " __USER_LABEL_PREFIX__ "__do_init\n\t"
     ".popsection");
-#elif defined(__arm__)
+#elif defined(__arm__) || defined(__aarch64__)
 __asm__(".pushsection .init,\"ax\",%progbits\n\t"
     "bl " __USER_LABEL_PREFIX__ "__do_init\n\t"
     ".popsection");
@@ -101,7 +101,7 @@ __attribute__((section(".fini_array"),
 __asm__(".pushsection .fini,\"ax\", at progbits\n\t"
     "call " __USER_LABEL_PREFIX__ "__do_fini\n\t"
     ".popsection");
-#elif defined(__arm__)
+#elif defined(__arm__) || defined(__aarch64__)
 __asm__(".pushsection .fini,\"ax\",%progbits\n\t"
     "bl " __USER_LABEL_PREFIX__ "__do_fini\n\t"
     ".popsection");


        


More information about the llvm-commits mailing list