summaryrefslogtreecommitdiff
path: root/src/crti.s
diff options
context:
space:
mode:
authorAleksa Vučković <aleksav013@gmail.com>2021-10-07 12:04:07 +0200
committerAleksa Vučković <aleksav013@gmail.com>2021-10-07 12:04:07 +0200
commited5d024c8b4961b6d722bf45d2c98846afdc1191 (patch)
tree9c3e710bf1f1c64c7cebbffe8527a7c765b96228 /src/crti.s
parenta9f29cfe168f634434047b55ab16b760e9020680 (diff)
Calling global constructors
Diffstat (limited to 'src/crti.s')
-rw-r--r--src/crti.s16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/crti.s b/src/crti.s
new file mode 100644
index 0000000..30dd4ea
--- /dev/null
+++ b/src/crti.s
@@ -0,0 +1,16 @@
+/* x86 crti.s */
+.section .init
+.global _init
+.type _init, @function
+_init:
+ push %ebp
+ movl %esp, %ebp
+ /* gcc will nicely put the contents of crtbegin.o's .init section here. */
+
+.section .fini
+.global _fini
+.type _fini, @function
+_fini:
+ push %ebp
+ movl %esp, %ebp
+ /* gcc will nicely put the contents of crtbegin.o's .fini section here. */