summaryrefslogtreecommitdiff
path: root/crt
diff options
context:
space:
mode:
Diffstat (limited to 'crt')
-rw-r--r--crt/s390x/crti.s17
-rw-r--r--crt/s390x/crtn.s9
2 files changed, 26 insertions, 0 deletions
diff --git a/crt/s390x/crti.s b/crt/s390x/crti.s
new file mode 100644
index 00000000..f453205b
--- /dev/null
+++ b/crt/s390x/crti.s
@@ -0,0 +1,17 @@
+.section .init
+.align 2
+.global _init
+_init:
+ stmg %r14, %r15, 112(%r15)
+ lgr %r0, %r15
+ aghi %r15, -160
+ stg %r0, 0(%r15)
+
+.section .fini
+.align 2
+.global _fini
+_fini:
+ stmg %r14, %r15, 112(%r15)
+ lgr %r0, %r15
+ aghi %r15, -160
+ stg %r0, 0(%r15)
diff --git a/crt/s390x/crtn.s b/crt/s390x/crtn.s
new file mode 100644
index 00000000..06066dc9
--- /dev/null
+++ b/crt/s390x/crtn.s
@@ -0,0 +1,9 @@
+.section .init
+.align 2
+ lmg %r14, %r15, 272(%r15)
+ br %r14
+
+.section .fini
+.align 2
+ lmg %r14, %r15, 272(%r15)
+ br %r14