From 743f46030cfb6103482692502ffb86e78d10fb92 Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Mon, 3 Oct 2022 19:55:01 +0200 Subject: LibC: Declare _setjmp and _longjmp on non i386 platforms These aliases were previously only implemented for i386 and are required for certain Ports e.g. Lua. --- Userland/Libraries/LibC/arch/aarch64/setjmp.S | 4 ++++ Userland/Libraries/LibC/arch/x86_64/setjmp.S | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'Userland') diff --git a/Userland/Libraries/LibC/arch/aarch64/setjmp.S b/Userland/Libraries/LibC/arch/aarch64/setjmp.S index 6ae11c4151..65a47ee966 100644 --- a/Userland/Libraries/LibC/arch/aarch64/setjmp.S +++ b/Userland/Libraries/LibC/arch/aarch64/setjmp.S @@ -4,12 +4,16 @@ * SPDX-License-Identifier: BSD-2-Clause */ +.global _setjmp .global setjmp +_setjmp: setjmp: # FIXME: Possibly incomplete. ret +.global _longjmp .global longjmp +_longjmp: longjmp: # FIXME: Possibly incomplete. ret diff --git a/Userland/Libraries/LibC/arch/x86_64/setjmp.S b/Userland/Libraries/LibC/arch/x86_64/setjmp.S index 57e401d2d0..db33fcf28e 100644 --- a/Userland/Libraries/LibC/arch/x86_64/setjmp.S +++ b/Userland/Libraries/LibC/arch/x86_64/setjmp.S @@ -10,7 +10,9 @@ // /!\ Read setjmp.h before modifying this file! // +.global _setjmp .global setjmp +_setjmp: setjmp: mov $0, %esi // Set val argument to 0 @@ -44,7 +46,9 @@ sigsetjmp: xor %eax, %eax ret +.global _longjmp .global longjmp +_longjmp: longjmp: mov %esi, %eax test %eax, %eax -- cgit v1.2.3