From a07cbabcb3778006993d0f84549d120b2f53a4ed Mon Sep 17 00:00:00 2001 From: Bananymous Date: Tue, 10 Sep 2024 16:21:20 +0300 Subject: [PATCH] LibC: Define function sizes for setjmp and longjmp dynamic linking was complaining about these not existing --- userspace/libraries/LibC/arch/i686/setjmp.S | 4 ++++ userspace/libraries/LibC/arch/x86_64/setjmp.S | 2 ++ 2 files changed, 6 insertions(+) diff --git a/userspace/libraries/LibC/arch/i686/setjmp.S b/userspace/libraries/LibC/arch/i686/setjmp.S index 8b025507..3a33e21c 100644 --- a/userspace/libraries/LibC/arch/i686/setjmp.S +++ b/userspace/libraries/LibC/arch/i686/setjmp.S @@ -13,6 +13,8 @@ setjmp: ret + .size setjmp, . - setjmp + // void longjmp(jmp_buf env, int val) .global longjmp longjmp: @@ -26,3 +28,5 @@ longjmp: movl 0(%edx), %esp movl 4(%edx), %ecx jmp *%ecx + + .size longjmp, . - longjmp diff --git a/userspace/libraries/LibC/arch/x86_64/setjmp.S b/userspace/libraries/LibC/arch/x86_64/setjmp.S index 7bebf826..fd1634e8 100644 --- a/userspace/libraries/LibC/arch/x86_64/setjmp.S +++ b/userspace/libraries/LibC/arch/x86_64/setjmp.S @@ -10,6 +10,7 @@ setjmp: xorq %rax, %rax ret + .size setjmp, . - setjmp // void longjmp(jmp_buf env, int val) .global longjmp @@ -21,3 +22,4 @@ longjmp: movq 0(%rdi), %rsp movq 8(%rdi), %rcx jmp *%rcx + .size longjmp, . - longjmp