[PATCH] D72005: Check for aarch64 when not using .init_arrays

Sterling Augustine via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 30 08:22:53 PST 2019


saugustine created this revision.
saugustine added a reviewer: vvereschaka.
Herald added subscribers: llvm-commits, Sanitizers, kristof.beyls.
Herald added projects: Sanitizers, LLVM.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D72005

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


Index: compiler-rt/lib/crt/crtbegin.c
===================================================================
--- compiler-rt/lib/crt/crtbegin.c
+++ compiler-rt/lib/crt/crtbegin.c
@@ -52,7 +52,7 @@
 __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 @@
 __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");


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72005.235606.patch
Type: text/x-patch
Size: 846 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191230/b8f123ca/attachment.bin>


More information about the llvm-commits mailing list