Go to file
H.J. Lu 68cca6e1e8
x86-64: Add GLIBC_ABI_DT_X86_64_PLT [BZ #33212]
When the linker -z mark-plt option is used to add DT_X86_64_PLT,
DT_X86_64_PLTSZ and DT_X86_64_PLTENT, the r_addend field of the
R_X86_64_JUMP_SLOT relocation stores the offset of the indirect
branch instruction.  However, glibc versions without the commit:

commit f8587a6189
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri May 20 19:21:48 2022 -0700

    x86-64: Ignore r_addend for R_X86_64_GLOB_DAT/R_X86_64_JUMP_SLOT

    According to x86-64 psABI, r_addend should be ignored for R_X86_64_GLOB_DAT
    and R_X86_64_JUMP_SLOT.  Since linkers always set their r_addends to 0, we
    can ignore their r_addends.

    Reviewed-by: Fangrui Song <maskray@google.com>

won't ignore the r_addend value in the R_X86_64_JUMP_SLOT relocation.
Such programs and shared libraries will fail at run-time randomly.

Add GLIBC_ABI_DT_X86_64_PLT version to indicate that glibc is compatible
with DT_X86_64_PLT.

The linker can add the glibc GLIBC_ABI_DT_X86_64_PLT version dependency
whenever -z mark-plt is passed to the linker.  The resulting programs and
shared libraries will fail to load at run-time against libc.so without the
GLIBC_ABI_DT_X86_64_PLT version, instead of fail randomly.

This fixes BZ #33212.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
(cherry picked from commit 399384e0c8)
2025-08-18 01:06:48 +01:00
ChangeLog.old
argp
assert
benchtests
bits
catgets
conform
crypt
csu
ctype
debug debug: Mark libSegFault.so as NODELETE 2023-07-21 16:39:46 +02:00
dirent
dlfcn
elf elf: Disable some subtests of ifuncmain1, ifuncmain5 for !PIE 2024-05-09 16:47:01 -07:00
gmon
gnulib
grp
gshadow
hesiod
htl
hurd
iconv
iconvdata iconv: ISO-2022-CN-EXT: fix out-of-bound writes when writing escape sequence (CVE-2024-2961) 2024-04-17 14:03:53 -03:00
include
inet
intl
io
libio
locale
localedata
login
mach
malloc
manual x86: Add bounds `x86_non_temporal_threshold` 2022-07-18 22:13:57 -07:00
math
mathvec
misc
nis
nptl nptl: Add backoff mechanism to spinlock loop 2022-09-28 15:36:46 -07:00
nptl_db
nscd nscd: Use time_t for return type of addgetnetgrentX 2024-05-03 09:22:44 +02:00
nss
po
posix posix: Fix double-free after allocation failure in regcomp (bug 33185) 2025-07-24 12:11:24 +02:00
pwd
resolv
resource
rt
scripts
setjmp
shadow
signal
socket socket: Do not use AF_NETLINK in __opensock 2022-02-03 20:04:32 +01:00
soft-fp
stdio-common
stdlib realpath: Avoid overwriting preexisting error (CVE-2021-3998) 2022-01-24 17:30:16 +01:00
string x86: Fix wcsnlen-avx2 page cross length comparison [BZ #29591] 2022-11-24 15:12:44 -08:00
sunrpc
support support: Fix xclone build failures on ia64 and hppa 2022-01-26 18:50:39 +01:00
sysdeps x86-64: Add GLIBC_ABI_DT_X86_64_PLT [BZ #33212] 2025-08-18 01:06:48 +01:00
sysvipc
termios
time
timezone
wcsmbs
wctype
.gitattributes
.gitignore
COPYING
COPYING.LIB
INSTALL
LICENSES
MAINTAINERS
Makeconfig Force DT_RPATH for --enable-hardcoded-path-in-tests 2024-05-10 05:46:28 -07:00
Makefile
Makefile.help
Makefile.in
Makerules
NEWS posix: Fix double-free after allocation failure in regcomp (bug 33185) 2025-07-24 12:11:24 +02:00
README
Rules
abi-tags
aclocal.m4
config.h.in
config.make.in
configure
configure.ac
extra-lib.mk
gen-locales.mk
libc-abis
libof-iterator.mk
o-iterator.mk
shlib-versions
test-skeleton.c
version.h

README

This directory contains the sources of the GNU C Library.
See the file "version.h" for what release version you have.

The GNU C Library is the standard system C library for all GNU systems,
and is an important part of what makes up a GNU system.  It provides the
system API for all programs written in C and C-compatible languages such
as C++ and Objective C; the runtime facilities of other programming
languages use the C library to access the underlying operating system.

In GNU/Linux systems, the C library works with the Linux kernel to
implement the operating system behavior seen by user applications.
In GNU/Hurd systems, it works with a microkernel and Hurd servers.

The GNU C Library implements much of the POSIX.1 functionality in the
GNU/Hurd system, using configurations i[4567]86-*-gnu.

When working with Linux kernels, this version of the GNU C Library
requires Linux kernel version 3.2 or later.

Also note that the shared version of the libgcc_s library must be
installed for the pthread library to work correctly.

The GNU C Library supports these configurations for using Linux kernels:

	aarch64*-*-linux-gnu
	alpha*-*-linux-gnu
	arc*-*-linux-gnu
	arm-*-linux-gnueabi
	csky-*-linux-gnuabiv2
	hppa-*-linux-gnu
	i[4567]86-*-linux-gnu
	x86_64-*-linux-gnu	Can build either x86_64 or x32
	ia64-*-linux-gnu
	m68k-*-linux-gnu
	microblaze*-*-linux-gnu
	mips-*-linux-gnu
	mips64-*-linux-gnu
	powerpc-*-linux-gnu	Hardware or software floating point, BE only.
	powerpc64*-*-linux-gnu	Big-endian and little-endian.
	s390-*-linux-gnu
	s390x-*-linux-gnu
	riscv32-*-linux-gnu
	riscv64-*-linux-gnu
	sh[34]-*-linux-gnu
	sparc*-*-linux-gnu
	sparc64*-*-linux-gnu

If you are interested in doing a port, please contact the glibc
maintainers; see https://www.gnu.org/software/libc/ for more
information.

See the file INSTALL to find out how to configure, build, and install
the GNU C Library.  You might also consider reading the WWW pages for
the C library at https://www.gnu.org/software/libc/.

The GNU C Library is (almost) completely documented by the Texinfo manual
found in the `manual/' subdirectory.  The manual is still being updated
and contains some known errors and omissions; we regret that we do not
have the resources to work on the manual as much as we would like.  For
corrections to the manual, please file a bug in the `manual' component,
following the bug-reporting instructions below.  Please be sure to check
the manual in the current development sources to see if your problem has
already been corrected.

Please see https://www.gnu.org/software/libc/bugs.html for bug reporting
information.  We are now using the Bugzilla system to track all bug reports.
This web page gives detailed information on how to report bugs properly.

The GNU C Library is free software.  See the file COPYING.LIB for copying
conditions, and LICENSES for notices about a few contributions that require
these additional notices to be distributed.  License copyright years may be
listed using range notation, e.g., 1996-2015, indicating that every year in
the range, inclusive, is a copyrightable year that would otherwise be listed
individually.