Logo
Explore Help
Sign In
fluencelabs/musl
1
0
Fork 0
You've already forked musl
mirror of https://github.com/fluencelabs/musl synced 2025-06-04 10:31:37 +00:00
Code Issues Projects Releases Wiki Activity
musl/crt/i386/crt1.s

23 lines
310 B
ArmAsm
Raw Normal View History

add support for init/finit (constructors and destructors) this is mainly in hopes of supporting c++ (not yet possible for other reasons) but will also help applications/libraries which use (and more often, abuse) the gcc __attribute__((__constructor__)) feature in "C" code. x86_64 and arm versions of the new startup asm are untested and may have minor problems.
2012-02-06 14:39:09 -05:00
.weak _init
.weak _fini
initial check-in, version 0.5.0
2011-02-12 00:22:29 -05:00
.text
.global _start
_start:
xorl %ebp,%ebp
popl %ecx
movl %esp,%eax
andl $-16,%esp
pushl %esp
pushl %esp
pushl %edx
add support for init/finit (constructors and destructors) this is mainly in hopes of supporting c++ (not yet possible for other reasons) but will also help applications/libraries which use (and more often, abuse) the gcc __attribute__((__constructor__)) feature in "C" code. x86_64 and arm versions of the new startup asm are untested and may have minor problems.
2012-02-06 14:39:09 -05:00
call 1f
1: addl $[_fini-.],(%esp)
call 1f
1: addl $[_init-.],(%esp)
initial check-in, version 0.5.0
2011-02-12 00:22:29 -05:00
pushl %eax
pushl %ecx
make startup code PIE-compatible
2011-02-21 22:26:31 -05:00
call 1f
1: addl $[main-.],(%esp)
initial check-in, version 0.5.0
2011-02-12 00:22:29 -05:00
call __libc_start_main
make startup code PIE-compatible
2011-02-21 22:26:31 -05:00
1: jmp 1b
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 49ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API