From f35d2124c36f8d39a953b76620e081b79c2faffd Mon Sep 17 00:00:00 2001 From: Miguel Date: Sun, 14 Oct 2018 23:08:07 +0200 Subject: moved newlib specific stuff and similar into ./interface/ --- interface/crt0.s | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'interface/crt0.s') 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 -- cgit v1.2.3