diff options
| author | Miguel <m.i@gmx.at> | 2018-10-14 23:08:07 +0200 |
|---|---|---|
| committer | Miguel <m.i@gmx.at> | 2018-10-14 23:08:07 +0200 |
| commit | f35d2124c36f8d39a953b76620e081b79c2faffd (patch) | |
| tree | 216e3a75841acc69672bf5640cc2f86e93e1ba37 /interface/crt0.s | |
| parent | 2a6690e9fd53a02613796764248006e06ac482d6 (diff) | |
moved newlib specific stuff and similar into ./interface/
Diffstat (limited to 'interface/crt0.s')
| -rw-r--r-- | interface/crt0.s | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/interface/crt0.s b/interface/crt0.s index 935e5bd..337d51b 100644 --- a/interface/crt0.s +++ b/interface/crt0.s @@ -79,9 +79,12 @@ call main and $-16,%esp sub $4,%esp -push %eax +push %eax // preserve main return value + call _fini //desctructors from .dtors +call _flushing // force stdout flushin + // pop programmm return value pop %eax @@ -89,9 +92,6 @@ pop %eax and $-16,%esp sub $4,%esp -push stdout -call fflush - # push exit code and pass to _exit syscall push %eax call exit |
