forked from bminor/glibc
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nptl: Remove vfork IFUNC-based forwarder from libpthread [BZ #20188]
With commit f0b2132 ("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.
- Loading branch information
1 parent
27cec9a
commit 41d6f74
Showing
40 changed files
with
129 additions
and
397 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,84 @@ | ||
2019-07-01 Florian Weimer <[email protected]> | ||
|
||
[BZ #20188] | ||
* nptl/Versions (libpthread): Remove __fork from GLIBC_2.0. | ||
Replace __vfork with __libpthread_version_placeholder for | ||
GLIBC_2.1.2. | ||
(libc): Remove __libc_vfork from GLIBC_PRIVATE. | ||
* nptl/Makefile (libpthread-routines): Remove pt-vfork. Add | ||
libpthread-compat. | ||
* nptl/pt-vfork.c: Remove file. | ||
* sysdeps/unix/sysv/linux/aarch64/pt-vfork.c: Likewise. | ||
* sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Likewise. | ||
* sysdeps/unix/sysv/linux/csky/pt-vfork.S: Likewise. | ||
* sysdeps/unix/sysv/linux/hppa/pt-vfork.S: Likewise. | ||
* sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Likewise. | ||
* sysdeps/unix/sysv/linux/m68k/pt-vfork.c: Likewise. | ||
* sysdeps/unix/sysv/linux/microblaze/pt-vfork.S: Likewise. | ||
* sysdeps/unix/sysv/linux/mips/pt-vfork.S: Likewise. | ||
* sysdeps/unix/sysv/linux/nios2/pt-vfork.S: Likewise. | ||
* sysdeps/unix/sysv/linux/riscv/pt-vfork.S: Likewise. | ||
* sysdeps/unix/sysv/linux/s390/pt-vfork.S: Likewise. | ||
* sysdeps/unix/sysv/linux/sh/pt-vfork.S: Likewise. | ||
* sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Likewise. | ||
* sysdeps/unix/sysv/linux/aarch64/libpthread.abilist (GLIBC_2.17): | ||
Remove vfork, __vfork. | ||
* sysdeps/unix/sysv/linux/alpha/libpthread.abilist (GLIBC_2.0): | ||
Remove vfork. | ||
(GLIBC_2.1.2): Replace __vfork with | ||
__libpthread_version_placeholder. | ||
* sysdeps/unix/sysv/linux/arm/libpthread.abilist (GLIBC_2.4): | ||
Remove vfork, __vfork. | ||
* sysdeps/unix/sysv/linux/hppa/libpthread.abilist (GLIBC_2.2): | ||
Likewise. | ||
* sysdeps/unix/sysv/linux/i386/libpthread.abilist (GLIBC_2.0): | ||
Remove vfork. | ||
(GLIBC_2.1.2): Replace __vfork with | ||
__libpthread_version_placeholder. | ||
* sysdeps/unix/sysv/linux/ia64/libpthread.abilist (GLIBC_2.2): | ||
Remove vfork. | ||
* sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist | ||
(GLIBC_2.4): Remove vfork, __vfork. | ||
* sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist | ||
(GLIBC_2.0): Remove vfork. | ||
(GLIBC_2.1.2): Replace __vfork with | ||
__libpthread_version_placeholder. | ||
* sysdeps/unix/sysv/linux/microblaze/libpthread.abilist | ||
(GLIBC_2.18): Remove vfork, __vfork. | ||
* sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist | ||
(GLIBC_2.0): Remove vfork. | ||
(GLIBC_2.2): Remove __vfork. | ||
* sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist: | ||
(GLIBC_2.2): Remove vfork, __vfork. | ||
* sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist: | ||
(GLIBC_2.0): Remove vfork. | ||
(GLIBC_2.1.2): Replace __vfork with | ||
__libpthread_version_placeholder. | ||
* sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist | ||
(GLIBC_2.3): Remove vfork, __vfork. | ||
* sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist | ||
(GLIBC_2.17): Likewise. | ||
* sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist | ||
(GLIBC_2.0): Remove vfork. | ||
(GLIBC_2.1.2): Replace __vfork with | ||
__libpthread_version_placeholder. | ||
* sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist | ||
(GLIBC_2.2): Remove vfork, __vfork. | ||
* sysdeps/unix/sysv/linux/sh/libpthread.abilist (GLIBC_2.2): | ||
Likewise. | ||
* sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist | ||
(GLIBC_2.0): Remove vfork. | ||
(GLIBC_2.1.2): Replace __vfork with | ||
__libpthread_version_placeholder. | ||
* sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist | ||
(GLIBC_2.2): Remove vfork, __vfork. | ||
* sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist | ||
(GLIBC_2.2.5): Likewise. | ||
* sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist | ||
(GLIBC_2.16): Likewise. | ||
* sysdeps/unix/sysv/linux/hppa/localplt.data (libpthread.so): | ||
Remove __errno_location. | ||
|
||
2019-07-02 Florian Weimer <[email protected]> | ||
|
||
[BZ #24757] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* Placeholder definitions to pull in removed symbol versions. | ||
Copyright (C) 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 <shlib-compat.h> | ||
|
||
/* This is an unused compatibility symbol definition, to prevent ld | ||
from creating a weak version definition for GLIBC_2.1.2. (__vfork | ||
used to be defined at that version, but it is now provided by libc, | ||
and there are no versions left in libpthread for that symbol | ||
version.) If the ABI baseline for glibc is the GLIBC_2.2 symbol | ||
version or later, the placeholder symbol is not needed because | ||
there are plenty of other symbols which populate those later | ||
versions. */ | ||
#if (SHLIB_COMPAT (libpthread, GLIBC_2_1_2, GLIBC_2_2)) | ||
void | ||
attribute_compat_text_section | ||
__libpthread_version_placeholder (void) | ||
{ | ||
} | ||
compat_symbol (libpthread, __libpthread_version_placeholder, | ||
__libpthread_version_placeholder, GLIBC_2_1_2); | ||
#endif |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.