diff options
author | Florian Weimer <fweimer@redhat.com> | 2019-07-02 15:12:20 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2019-07-02 16:51:13 +0200 |
commit | 41d6f74e6cb6a92ab428c11ee1e408b2a16aa1b0 (patch) | |
tree | ece03ae53e8fd589f2c493cb753c132545a49196 /sysdeps/unix/sysv/linux/hppa/pt-vfork.S | |
parent | 27cec9aed97447dff887a88f4241604fffd8c525 (diff) | |
download | glibc-41d6f74e6cb6a92ab428c11ee1e408b2a16aa1b0.tar.gz glibc-41d6f74e6cb6a92ab428c11ee1e408b2a16aa1b0.tar.xz glibc-41d6f74e6cb6a92ab428c11ee1e408b2a16aa1b0.zip |
nptl: Remove vfork IFUNC-based forwarder from libpthread [BZ #20188]
With commit f0b2132b35248c1f4a80f62a2c38cddcc802aa8c ("ld.so: Support moving versioned symbols between sonames [BZ #24741]"), the dynamic linker will find the definition of vfork in libc and binds a vfork reference to that symbol, even if the soname in the version reference says that the symbol should be located in libpthread. As a result, the forwarder (whether it's IFUNC-based or a duplicate of the libc implementation) is no longer necessary. On older architectures, a placeholder symbol is required, to make sure that the GLIBC_2.1.2 symbol version does not go away, or is turned in to a weak symbol definition by the link editor. (The symbol version needs to preserved so that the symbol coverage check in elf/dl-version.c does not fail for old binaries.) mips32 is an outlier: It defined __vfork@@GLIBC_2.2, but the baseline is GLIBC_2.0. Since there are other @@GLIBC_2.2 symbols, the placeholder symbol is not needed there.
Diffstat (limited to 'sysdeps/unix/sysv/linux/hppa/pt-vfork.S')
-rw-r--r-- | sysdeps/unix/sysv/linux/hppa/pt-vfork.S | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/sysdeps/unix/sysv/linux/hppa/pt-vfork.S b/sysdeps/unix/sysv/linux/hppa/pt-vfork.S deleted file mode 100644 index 9d7dda8b63..0000000000 --- a/sysdeps/unix/sysv/linux/hppa/pt-vfork.S +++ /dev/null @@ -1,82 +0,0 @@ -/* Copyright (C) 2005-2019 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ - -#include <sysdep.h> -#define _ERRNO_H 1 -#include <bits/errno.h> -#include <tcb-offsets.h> - -/* Clone the calling process, but without copying the whole address space. - The calling process is suspended until the new process exits or is - replaced by a call to `execve'. Return -1 for errors, 0 to the new process, - and the process ID of the new process to the old process. */ - -.Lthread_start: ASM_LINE_SEP - - /* r26, r25, r24, r23 are free since vfork has no arguments */ -ENTRY(__vfork) - /* We must not create a frame. When the child unwinds to call - exec it will clobber the same frame that the parent - needs to unwind. */ - - /* Save the PIC register. */ -#ifdef PIC - copy %r19, %r25 /* parent */ -#endif - - /* Syscall saves and restores all register states */ - ble 0x100(%sr2,%r0) - ldi __NR_vfork,%r20 - - /* Check for error */ - ldi -4096,%r1 - comclr,>>= %r1,%ret0,%r0 /* Note: unsigned compare. */ - b,n .Lerror - - /* Return, and DO NOT restore rp. The child may have called - functions that updated the frame's rp. This works because - the kernel ensures rp is preserved across the vfork - syscall. */ - bv,n %r0(%rp) - -.Lerror: - /* Now we need a stack to call a function. We are assured - that there is no child now, so it's safe to create - a frame. */ - stw %rp, -20(%sp) - .cfi_offset 2, -20 - stwm %r3, 64(%sp) - .cfi_def_cfa_offset -64 - .cfi_offset 3, 0 - stw %sp, -4(%sp) - - sub %r0,%ret0,%r3 - SYSCALL_ERROR_HANDLER - /* Restore the PIC register (in delay slot) on error */ -#ifdef PIC - copy %r25, %r19 /* parent */ -#else - nop -#endif - /* Write syscall return into errno location */ - stw %r3, 0(%ret0) - ldw -84(%sp), %rp - bv %r0(%rp) - ldwm -64(%sp), %r3 -PSEUDO_END (__vfork) -libc_hidden_def (__vfork) -weak_alias (__vfork, vfork) |