summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSterling Augustine <saugustine@google.com>2019-12-30 08:20:24 -0800
committerSterling Augustine <saugustine@google.com>2020-01-02 10:10:49 -0800
commit108daf76118e5b97696f58386d0b48d4b858ffad (patch)
tree9c21daa63df6df9cad5333bd7c66cf623fa98f58
parent97864f4f3a12272752dd8adb0f10e675ade42205 (diff)
downloadbcm5719-llvm-108daf76118e5b97696f58386d0b48d4b858ffad.tar.gz
bcm5719-llvm-108daf76118e5b97696f58386d0b48d4b858ffad.zip
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
-rw-r--r--compiler-rt/lib/crt/crtbegin.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler-rt/lib/crt/crtbegin.c b/compiler-rt/lib/crt/crtbegin.c
index b2b62798d03..24bea1a2c3a 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\",@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\",@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");
OpenPOWER on IntegriCloud