1 From b87c1ec3fa398646f042a68f0ce0f7d09c1348c7 Mon Sep 17 00:00:00 2001
2 From: Aurelien Jarno <aurelien@aurel32.net>
3 Date: Tue, 21 Jun 2016 23:59:37 +0200
4 Subject: [PATCH] MIPS, SPARC: more fixes to the vfork aliases in libpthread.so
6 Commit 43c29487 tried to fix the vfork aliases in libpthread.so on MIPS
7 and SPARC, but failed to do it correctly, introducing an ABI change.
9 This patch does the remaining changes needed to align the MIPS and SPARC
10 vfork implementations with the other architectures. That way the the
11 alpha version of pt-vfork.S works correctly for MIPS and SPARC. The
12 changes for alpha were done in 82aab97c.
15 * sysdeps/unix/sysv/linux/mips/vfork.S (__vfork): Rename into
17 (__vfork) [IS_IN (libc)]: Remove alias.
18 (__libc_vfork) [IS_IN (libc)]: Define as an alias.
19 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
20 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
22 [Vincent: do not patch ChangeLog]
24 Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
26 sysdeps/unix/sysv/linux/mips/vfork.S | 12 ++++++------
27 sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S | 8 ++++----
28 sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S | 8 ++++----
29 3 files changed, 14 insertions(+), 14 deletions(-)
31 diff --git a/sysdeps/unix/sysv/linux/mips/vfork.S b/sysdeps/unix/sysv/linux/mips/vfork.S
32 index c0c0ce6..1867c86 100644
33 --- a/sysdeps/unix/sysv/linux/mips/vfork.S
34 +++ b/sysdeps/unix/sysv/linux/mips/vfork.S
37 FRAMESZ= (((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK
38 GPOFF= FRAMESZ-(1*SZREG)
39 -NESTED(__vfork,FRAMESZ,sp)
40 +NESTED(__libc_vfork,FRAMESZ,sp)
45 cfi_adjust_cfa_offset (FRAMESZ)
46 - SETUP_GP64_REG (a5, __vfork)
47 + SETUP_GP64_REG (a5, __libc_vfork)
51 @@ -104,10 +104,10 @@ L(error):
59 -libc_hidden_def(__vfork)
60 -weak_alias (__vfork, vfork)
61 -strong_alias (__vfork, __libc_vfork)
62 +weak_alias (__libc_vfork, vfork)
63 +strong_alias (__libc_vfork, __vfork)
64 +libc_hidden_def (__vfork)
66 diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S b/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S
67 index 94f2c8d..0d0a3b5 100644
68 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S
69 +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S
73 .globl __syscall_error
79 @@ -42,10 +42,10 @@ ENTRY(__vfork)
87 +weak_alias (__libc_vfork, vfork)
88 +strong_alias (__libc_vfork, __vfork)
89 libc_hidden_def (__vfork)
90 -weak_alias (__vfork, vfork)
91 -strong_alias (__vfork, __libc_vfork)
93 diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S b/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S
94 index a7479e9..0818eba 100644
95 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S
96 +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S
100 .globl __syscall_error
104 sethi %hi(0x80000000), %o3
106 @@ -42,10 +42,10 @@ ENTRY(__vfork)
114 +weak_alias (__libc_vfork, vfork)
115 +strong_alias (__libc_vfork, __vfork)
116 libc_hidden_def (__vfork)
117 -weak_alias (__vfork, vfork)
118 -strong_alias (__vfork, __libc_vfork)