From 3ce61229fb4b778d9bd528433bdc9244ade9ba69 Mon Sep 17 00:00:00 2001 From: no92 Date: Thu, 30 Nov 2023 23:37:16 +0100 Subject: [PATCH] sysdeps/managarm: push/pop rax in crt[in].o --- sysdeps/managarm/x86_64/crt-src/crti.S | 2 ++ sysdeps/managarm/x86_64/crt-src/crtn.S | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sysdeps/managarm/x86_64/crt-src/crti.S b/sysdeps/managarm/x86_64/crt-src/crti.S index 889b2a5090..1ca20f2bf9 100644 --- a/sysdeps/managarm/x86_64/crt-src/crti.S +++ b/sysdeps/managarm/x86_64/crt-src/crti.S @@ -4,10 +4,12 @@ .globl _init .type _init,@function _init: + push %rax .section .fini .globl _fini .type _fini,@function _fini: + push %rax .section .note.GNU-stack,"",%progbits diff --git a/sysdeps/managarm/x86_64/crt-src/crtn.S b/sysdeps/managarm/x86_64/crt-src/crtn.S index 1b2ca89f03..fdb309e857 100644 --- a/sysdeps/managarm/x86_64/crt-src/crtn.S +++ b/sysdeps/managarm/x86_64/crt-src/crtn.S @@ -1,9 +1,11 @@ - .ident "x86_64-managarm-mlibc crtn" +.ident "x86_64-managarm-mlibc crtn" - .section .init +.section .init + pop %rax ret - .section .fini +.section .fini + pop %rax ret - .section .note.GNU-stack,"",%progbits +.section .note.GNU-stack,"",%progbits