aboutsummaryrefslogtreecommitdiff
path: root/src/header
diff options
context:
space:
mode:
Diffstat (limited to 'src/header')
-rw-r--r--src/header/crti.s12
-rw-r--r--src/header/crtn.s7
2 files changed, 19 insertions, 0 deletions
diff --git a/src/header/crti.s b/src/header/crti.s
new file mode 100644
index 0000000..91e86fa
--- /dev/null
+++ b/src/header/crti.s
@@ -0,0 +1,12 @@
+.section .init
+.global _init
+.type _init @function
+_init:
+ push %ebp
+ movl %esp, %ebp
+
+.section .fini
+.global _fini
+_fini:
+ push %ebp
+ movl %esp, %ebp
diff --git a/src/header/crtn.s b/src/header/crtn.s
new file mode 100644
index 0000000..4874122
--- /dev/null
+++ b/src/header/crtn.s
@@ -0,0 +1,7 @@
+.section .init
+ popl %ebp
+ ret
+
+.section .fini
+ popl %ebp
+ ret