hrev50488 adds 1 changeset to branch 'master'
old head: 8471ec3d566da2087e09192dd0fd0dc0f08ceee8
new head: c92f19c6e81cea0d7cb7224782d5bd8c67b43f3f
overview:
http://cgit.haiku-os.org/haiku/log/?qt=range&q=c92f19c6e81c+%5E8471ec3d566d
----------------------------------------------------------------------------
c92f19c6e81c: Fix definition of _setjmp
The #pragma weak does not work, the symbol is not defined and when
already defined, it is not made weak. Moreover, it does not make the
symbol global so we need to declare it with a FUNCTION.
If we want the symbol to be weak, then we should use .weak to do so. The
_longjmp symbol should also be changed to match, in that case.
Fixes #12912.
[ Adrien Destugues <pulkomandy@xxxxxxxxxxxxx> ]
----------------------------------------------------------------------------
Revision: hrev50488
Commit: c92f19c6e81cea0d7cb7224782d5bd8c67b43f3f
URL: http://cgit.haiku-os.org/haiku/commit/?id=c92f19c6e81c
Author: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Date: Sun Aug 14 07:13:44 2016 UTC
Ticket: https://dev.haiku-os.org/ticket/12912
----------------------------------------------------------------------------
5 files changed, 5 insertions(+)
src/system/libroot/posix/arch/arm/sigsetjmp.S | 1 +
src/system/libroot/posix/arch/m68k/sigsetjmp.S | 1 +
src/system/libroot/posix/arch/ppc/sigsetjmp.S | 1 +
src/system/libroot/posix/arch/x86/sigsetjmp.S | 1 +
src/system/libroot/posix/arch/x86_64/sigsetjmp.S | 1 +
----------------------------------------------------------------------------
diff --git a/src/system/libroot/posix/arch/arm/sigsetjmp.S
b/src/system/libroot/posix/arch/arm/sigsetjmp.S
index 74e046d..94dadee 100644
--- a/src/system/libroot/posix/arch/arm/sigsetjmp.S
+++ b/src/system/libroot/posix/arch/arm/sigsetjmp.S
@@ -19,6 +19,7 @@ FUNCTION_END(__sigsetjmp)
/* int setjmp(jmp_buf buffer) */
FUNCTION(setjmp):
+FUNCTION(_setjmp):
stmia r0, {r0-r14}
mrs r1, cpsr
str r1, [r0, #64]
diff --git a/src/system/libroot/posix/arch/m68k/sigsetjmp.S
b/src/system/libroot/posix/arch/m68k/sigsetjmp.S
index 28966dd..7a1f501 100644
--- a/src/system/libroot/posix/arch/m68k/sigsetjmp.S
+++ b/src/system/libroot/posix/arch/m68k/sigsetjmp.S
@@ -33,6 +33,7 @@ FUNCTION_END(sigsetjmp)
/* int setjmp(jmp_buf buffer) */
FUNCTION(setjmp):
+FUNCTION(_setjmp):
move.l (%a7)+,%a0
move.l (%a7)+,%d0
clr.l -(%a7) /* push 0 as 2nd arg */
diff --git a/src/system/libroot/posix/arch/ppc/sigsetjmp.S
b/src/system/libroot/posix/arch/ppc/sigsetjmp.S
index 8bf45a6..9158525 100644
--- a/src/system/libroot/posix/arch/ppc/sigsetjmp.S
+++ b/src/system/libroot/posix/arch/ppc/sigsetjmp.S
@@ -44,6 +44,7 @@ FUNCTION(sigsetjmp):
/* int setjmp(jmp_buf buffer) */
FUNCTION(setjmp):
+FUNCTION(_setjmp):
// call __sigsetjmp with saveMask = 0
addi %r4, 0, 0
b __sigsetjmp
diff --git a/src/system/libroot/posix/arch/x86/sigsetjmp.S
b/src/system/libroot/posix/arch/x86/sigsetjmp.S
index 9498135..2016cbe 100644
--- a/src/system/libroot/posix/arch/x86/sigsetjmp.S
+++ b/src/system/libroot/posix/arch/x86/sigsetjmp.S
@@ -43,6 +43,7 @@ FUNCTION_END(sigsetjmp)
/* int setjmp(jmp_buf buffer) */
FUNCTION(setjmp):
+FUNCTION(_setjmp):
// prepare %edx, %ecx, and %eax for sigsetjmp
mov 0(%esp), %edx
lea 4(%esp), %ecx
diff --git a/src/system/libroot/posix/arch/x86_64/sigsetjmp.S
b/src/system/libroot/posix/arch/x86_64/sigsetjmp.S
index 7086697..16974c2 100644
--- a/src/system/libroot/posix/arch/x86_64/sigsetjmp.S
+++ b/src/system/libroot/posix/arch/x86_64/sigsetjmp.S
@@ -30,6 +30,7 @@ FUNCTION_END(setjmp)
/* int setjmp(jmp_buf buffer) */
FUNCTION(setjmp):
+FUNCTION(_setjmp):
// Jump to sigsetjmp with a zero saveMask.
xorl %esi, %esi
jmp sigsetjmp@PLT