summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibC
diff options
context:
space:
mode:
authorJan200101 <sentrycraft123@gmail.com>2022-10-03 19:55:01 +0200
committerAndrew Kaster <andrewdkaster@gmail.com>2022-10-12 02:07:27 -0600
commit743f46030cfb6103482692502ffb86e78d10fb92 (patch)
tree93828d793f96e53a7c8902b6af0fd3303946c2b3 /Userland/Libraries/LibC
parent41cb705b4711909d915f6b6e87d05100050a9e1a (diff)
downloadserenity-743f46030cfb6103482692502ffb86e78d10fb92.zip
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.
Diffstat (limited to 'Userland/Libraries/LibC')
-rw-r--r--Userland/Libraries/LibC/arch/aarch64/setjmp.S4
-rw-r--r--Userland/Libraries/LibC/arch/x86_64/setjmp.S4
2 files changed, 8 insertions, 0 deletions
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