diff options
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 |
