summaryrefslogtreecommitdiff
path: root/crt
diff options
context:
space:
mode:
Diffstat (limited to 'crt')
-rw-r--r--crt/aarch64/crti.s13
-rw-r--r--crt/aarch64/crtn.s7
2 files changed, 20 insertions, 0 deletions
diff --git a/crt/aarch64/crti.s b/crt/aarch64/crti.s
new file mode 100644
index 00000000..775df0ac
--- /dev/null
+++ b/crt/aarch64/crti.s
@@ -0,0 +1,13 @@
+.section .init
+.global _init
+.type _init,%function
+_init:
+ stp x29,x30,[sp,-16]!
+ mov x29,sp
+
+.section .fini
+.global _fini
+.type _fini,%function
+_fini:
+ stp x29,x30,[sp,-16]!
+ mov x29,sp
diff --git a/crt/aarch64/crtn.s b/crt/aarch64/crtn.s
new file mode 100644
index 00000000..73cab692
--- /dev/null
+++ b/crt/aarch64/crtn.s
@@ -0,0 +1,7 @@
+.section .init
+ ldp x29,x30,[sp],#16
+ ret
+
+.section .fini
+ ldp x29,x30,[sp],#16
+ ret