diff --git a/compiler-rt/lib/crt/crtbegin.c b/compiler-rt/lib/crt/crtbegin.c --- a/compiler-rt/lib/crt/crtbegin.c +++ b/compiler-rt/lib/crt/crtbegin.c @@ -52,7 +52,7 @@ __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 @@ __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");