Fix crt0 init fini code
__USES_INITFINI__ ifdef was incorrectly copied from arm (it's an arm backend thing in gcc, not meaningful on aarch64)
This commit is contained in:
parent
363dbb9e44
commit
cfa64a86d1
|
@ -153,12 +153,10 @@
|
||||||
bl FUNCTION (initialise_monitor_handles)
|
bl FUNCTION (initialise_monitor_handles)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __USES_INITFINI__
|
|
||||||
/* .init and .fini sections are used to create constructors
|
/* .init and .fini sections are used to create constructors
|
||||||
and destructors. Here we call the _init function and arrange
|
and destructors. Here we call the _init function and arrange
|
||||||
for _fini to be called at program exit. */
|
for _fini to be called at program exit. */
|
||||||
ldr x0, .Lfini
|
ldr x0, .Lfini
|
||||||
#endif
|
|
||||||
bl FUNCTION (atexit)
|
bl FUNCTION (atexit)
|
||||||
|
|
||||||
bl FUNCTION (_init)
|
bl FUNCTION (_init)
|
||||||
|
@ -256,10 +254,8 @@ FUNCTION (_cpu_init_hook):
|
||||||
GEN_DWORD __bss_start__
|
GEN_DWORD __bss_start__
|
||||||
.LC2:
|
.LC2:
|
||||||
GEN_DWORD __bss_end__
|
GEN_DWORD __bss_end__
|
||||||
#ifdef __USES_INITFINI__
|
|
||||||
.Lfini:
|
.Lfini:
|
||||||
GEN_DWORD FUNCTION(_fini)
|
GEN_DWORD FUNCTION(_fini)
|
||||||
#endif
|
|
||||||
#ifdef ARM_RDI_MONITOR
|
#ifdef ARM_RDI_MONITOR
|
||||||
.Lenvp:
|
.Lenvp:
|
||||||
GEN_DWORD env
|
GEN_DWORD env
|
||||||
|
|
Loading…
Reference in New Issue