wut/libraries/wutcrt/crt0.s

20 lines
298 B
ArmAsm
Raw Normal View History

2018-05-25 12:31:38 +02:00
.extern main
.extern exit
.extern __init_wut
.extern __fini_wut
2018-05-25 12:31:38 +02:00
.global _start
_start:
stwu 1, -0x8(1)
stw 3, 0(1)
stw 4, 4(1)
bl __init_wut
2018-05-25 12:31:38 +02:00
lwz 3, 0(1)
lwz 4, 4(1)
bl main
bl __fini_wut
# Calling __fini is leading to crashes!
# bl __fini
2018-05-25 12:31:38 +02:00
addi 1, 1, 0x8
b exit