forked from OSchip/llvm-project
[RISCV][crt] support building without init_array
Reviewed By: luismarques, phosek, kito-cheng Differential Revision: https://reviews.llvm.org/D87997
This commit is contained in:
parent
10b164d2f7
commit
17427ec3f3
|
@ -52,6 +52,10 @@ __attribute__((section(".init_array"),
|
|||
__asm__(".pushsection .init,\"ax\",@progbits\n\t"
|
||||
"call " __USER_LABEL_PREFIX__ "__do_init\n\t"
|
||||
".popsection");
|
||||
#elif defined(__riscv)
|
||||
__asm__(".pushsection .init,\"ax\",%progbits\n\t"
|
||||
"call " __USER_LABEL_PREFIX__ "__do_init\n\t"
|
||||
".popsection");
|
||||
#elif defined(__arm__) || defined(__aarch64__)
|
||||
__asm__(".pushsection .init,\"ax\",%progbits\n\t"
|
||||
"bl " __USER_LABEL_PREFIX__ "__do_init\n\t"
|
||||
|
@ -110,6 +114,10 @@ __asm__(".pushsection .fini,\"ax\",@progbits\n\t"
|
|||
"bl " __USER_LABEL_PREFIX__ "__do_fini\n\t"
|
||||
"nop\n\t"
|
||||
".popsection");
|
||||
#elif defined(__riscv)
|
||||
__asm__(".pushsection .fini,\"ax\",@progbits\n\t"
|
||||
"call " __USER_LABEL_PREFIX__ "__do_fini\n\t"
|
||||
".popsection");
|
||||
#elif defined(__sparc__)
|
||||
__asm__(".pushsection .fini,\"ax\",@progbits\n\t"
|
||||
"call " __USER_LABEL_PREFIX__ "__do_fini\n\t"
|
||||
|
|
Loading…
Reference in New Issue