Skip to content

Commit 2e3dd35

Browse files
committed
fixed exit status restoration logic
1 parent 5168b90 commit 2e3dd35

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/crt/crt0.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ ___libload_libs_ret:
328328
.global ___exithl
329329
___exithl:
330330

331-
#if HAS_ATEXIT || HAS_FINI_ARRAY || HAS_ABORT
331+
#if HAS_ATEXIT || HAS_FINI_ARRAY
332332
push hl ; preserve exit status
333333
#endif
334334
; jr .L.exit_function_start
@@ -398,7 +398,7 @@ __Exit:
398398
pop bc ; destroy return address
399399
.L.skip.__Exit:
400400

401-
#if HAS_ATEXIT || HAS_FINI_ARRAY || HAS_ABORT
401+
#if HAS_ATEXIT || HAS_FINI_ARRAY
402402
pop hl ; restore exit status
403403
#endif
404404

0 commit comments

Comments
 (0)