Sync with Fedora rawhide (glibc-2.33.9000-36.fc35)

Upstream commit: b4f030ae95

Resolves: #1958224
This commit is contained in:
Florian Weimer 2021-07-01 08:32:08 +02:00
parent fe2bb6712c
commit 35622a8cd4
10 changed files with 85 additions and 763 deletions

View File

@ -1,5 +1,12 @@
# recipients: glibc-bugzilla
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_stable
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: baseos-qe.koji-build.scratch-build.validation}
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate

View File

@ -1,107 +0,0 @@
Emergency patch from libc-alpha.
From: Siddhesh Poyarekar <siddhesh@sourceware.org>
Subject: [PATCH v2] iconvconfig: Fix multiple issues
To: libc-alpha@sourceware.org
Cc: schwab@linux-m68k.org, fweimer@redhat.com
Date: Fri, 25 Jun 2021 14:31:28 +0530
Message-Id: <20210625090128.316837-1-siddhesh@sourceware.org>
It was noticed on big-endian systems that msgfmt would fail with the
following error:
msgfmt: gconv_builtin.c:70: __gconv_get_builtin_trans: Assertion `cnt < sizeof (map) / sizeof (map[0])' failed.
Aborted (core dumped)
This is only seen on installed systems because it was due to a
corrupted gconv-modules.cache. iconvconfig had the following issues
(it was specifically freeing fulldir that caused this issue, but other
cleanups are also needed) that this patch fixes.
- Add prefix only if dir starts with '/'
- Use asprintf instead of mempcpy so that the directory string is NULL
terminated
- Make a copy of the directory reference in new_module so that fulldir
can be freed within the same scope in handle_dir.
---
iconv/Makefile | 2 +-
iconv/iconvconfig.c | 24 +++++++++---------------
2 files changed, 10 insertions(+), 16 deletions(-)
diff --git a/iconv/Makefile b/iconv/Makefile
index a9b267c851..07d77c9eca 100644
--- a/iconv/Makefile
+++ b/iconv/Makefile
@@ -33,7 +33,7 @@ vpath %.c ../locale/programs ../intl
iconv_prog-modules = iconv_charmap charmap charmap-dir linereader \
dummy-repertoire simple-hash xstrdup xmalloc \
record-status
-iconvconfig-modules = strtab xmalloc hash-string
+iconvconfig-modules = strtab xmalloc xasprintf xstrdup hash-string
extra-objs = $(iconv_prog-modules:=.o) $(iconvconfig-modules:=.o)
CFLAGS-iconv_prog.c += -I../locale/programs
CFLAGS-iconv_charmap.c += -I../locale/programs
diff --git a/iconv/iconvconfig.c b/iconv/iconvconfig.c
index e69334d71c..783b2bbdbb 100644
--- a/iconv/iconvconfig.c
+++ b/iconv/iconvconfig.c
@@ -250,6 +250,7 @@ static const char gconv_module_ext[] = MODULE_EXT;
#include <programs/xmalloc.h>
+#include <programs/xasprintf.h>
/* C string table handling. */
@@ -519,11 +520,12 @@ module_compare (const void *p1, const void *p2)
/* Create new module record. */
static void
new_module (const char *fromname, size_t fromlen, const char *toname,
- size_t tolen, const char *directory,
+ size_t tolen, const char *dir_in,
const char *filename, size_t filelen, int cost, size_t need_ext)
{
struct module *new_module;
- size_t dirlen = strlen (directory) + 1;
+ size_t dirlen = strlen (dir_in) + 1;
+ const char *directory = xstrdup (dir_in);
char *tmp;
void **inserted;
@@ -654,20 +656,10 @@ handle_dir (const char *dir)
size_t dirlen = strlen (dir);
bool found = false;
- /* Add the prefix before sending it off to the parser. */
- char *fulldir = xmalloc (prefix_len + dirlen + 2);
- char *cp = mempcpy (mempcpy (fulldir, prefix, prefix_len), dir, dirlen);
+ char *fulldir = xasprintf ("%s%s%s", dir[0] == '/' ? prefix : "",
+ dir, dir[dirlen - 1] != '/' ? "/" : "");
- if (dir[dirlen - 1] != '/')
- {
- *cp++ = '/';
- *cp = '\0';
- dirlen++;
- }
-
- found = gconv_parseconfdir (fulldir, dirlen + prefix_len);
-
- free (fulldir);
+ found = gconv_parseconfdir (fulldir, strlen (fulldir));
if (!found)
{
@@ -679,6 +671,8 @@ handle_dir (const char *dir)
"configuration files with names ending in .conf.");
}
+ free (fulldir);
+
return found ? 0 : 1;
}
--
2.31.1

View File

@ -1,191 +0,0 @@
Author: Florian Weimer <fweimer@redhat.com>
Date: Thu Jun 17 19:23:00 2021 +0200
nptl: Export libthread_db-used symbols under GLIBC_PRIVATE
This allows distributions to strip debugging information from
libc.so.6 without impacting the debugging experience.
nptl_version had to be renamed to __nptl_version to avoid
namespace issues.
diff --git a/nptl/Versions b/nptl/Versions
index 62bb939d54..c03ed92848 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -403,10 +403,14 @@ libc {
__nptl_deallocate_tsd;
__nptl_death_event;
__nptl_free_tcb;
+ __nptl_last_event;
__nptl_nthreads;
+ __nptl_rtld_global;
__nptl_setxid_sighandler;
__nptl_stack_list_add;
__nptl_stack_list_del;
+ __nptl_threads_events;
+ __nptl_version;
__pthread_attr_copy;
__pthread_attr_destroy;
__pthread_attr_init;
@@ -430,6 +434,58 @@ libc {
__pthread_unwind;
__sched_fifo_max_prio;
__sched_fifo_min_prio;
+ _thread_db___nptl_last_event;
+ _thread_db___nptl_rtld_global;
+ _thread_db_const_thread_area;
+ _thread_db_dtv_dtv;
+ _thread_db_dtv_slotinfo_gen;
+ _thread_db_dtv_slotinfo_list_len;
+ _thread_db_dtv_slotinfo_list_next;
+ _thread_db_dtv_slotinfo_list_slotinfo;
+ _thread_db_dtv_slotinfo_map;
+ _thread_db_dtv_t_counter;
+ _thread_db_dtv_t_pointer_val;
+ _thread_db_link_map_l_tls_modid;
+ _thread_db_link_map_l_tls_offset;
+ _thread_db_list_t_next;
+ _thread_db_list_t_prev;
+ _thread_db_pthread_cancelhandling;
+ _thread_db_pthread_dtvp;
+ _thread_db_pthread_eventbuf;
+ _thread_db_pthread_eventbuf_eventmask;
+ _thread_db_pthread_eventbuf_eventmask_event_bits;
+ _thread_db_pthread_key_data_data;
+ _thread_db_pthread_key_data_level2_data;
+ _thread_db_pthread_key_data_seq;
+ _thread_db_pthread_key_struct_destr;
+ _thread_db_pthread_key_struct_seq;
+ _thread_db_pthread_list;
+ _thread_db_pthread_nextevent;
+ _thread_db_pthread_report_events;
+ _thread_db_pthread_schedparam_sched_priority;
+ _thread_db_pthread_schedpolicy;
+ _thread_db_pthread_specific;
+ _thread_db_pthread_start_routine;
+ _thread_db_pthread_tid;
+ _thread_db_register32;
+ _thread_db_register32_thread_area;
+ _thread_db_register64;
+ _thread_db_register64_thread_area;
+ _thread_db_rtld_global__dl_stack_used;
+ _thread_db_rtld_global__dl_stack_user;
+ _thread_db_rtld_global__dl_tls_dtv_slotinfo_list;
+ _thread_db_sizeof_dtv_slotinfo;
+ _thread_db_sizeof_dtv_slotinfo_list;
+ _thread_db_sizeof_list_t;
+ _thread_db_sizeof_pthread;
+ _thread_db_sizeof_pthread_key_data;
+ _thread_db_sizeof_pthread_key_data_level2;
+ _thread_db_sizeof_pthread_key_struct;
+ _thread_db_sizeof_td_eventbuf_t;
+ _thread_db_sizeof_td_thr_events_t;
+ _thread_db_td_eventbuf_t_eventdata;
+ _thread_db_td_eventbuf_t_eventnum;
+ _thread_db_td_thr_events_t_event_bits;
}
}
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index 3f017f1e26..d1b6817a81 100644
--- a/nptl/pthread_create.c
+++ b/nptl/pthread_create.c
@@ -43,21 +43,24 @@
/* Globally enabled events. */
-static td_thr_events_t __nptl_threads_events __attribute_used__;
+td_thr_events_t __nptl_threads_events __attribute__ ((nocommon));
+libc_hidden_proto (__nptl_threads_events)
+libc_hidden_data_def (__nptl_threads_events)
/* Pointer to descriptor with the last event. */
-static struct pthread *__nptl_last_event __attribute_used__;
+struct pthread *__nptl_last_event __attribute__ ((nocommon));
+libc_hidden_proto (__nptl_last_event)
+libc_hidden_data_def (__nptl_last_event)
#ifdef SHARED
/* This variable is used to access _rtld_global from libthread_db. If
GDB loads libpthread before ld.so, it is not possible to resolve
_rtld_global directly during libpthread initialization. */
-static struct rtld_global *__nptl_rtld_global __attribute_used__
- = &_rtld_global;
+struct rtld_global *__nptl_rtld_global = &_rtld_global;
#endif
/* Version of the library, used in libthread_db to detect mismatches. */
-static const char nptl_version[] __attribute_used__ = VERSION;
+const char __nptl_version[] = VERSION;
/* This performs the initialization necessary when going from
single-threaded to multi-threaded mode for the first time. */
diff --git a/nptl_db/Makefile b/nptl_db/Makefile
index ea721c1dcf..4cc51c0e7b 100644
--- a/nptl_db/Makefile
+++ b/nptl_db/Makefile
@@ -57,7 +57,7 @@ include ../Rules
$(objpfx)db-symbols.out: $(objpfx)db-symbols.v.i \
$(common-objpfx)libc.so
- LC_ALL=C $(READELF) -W -s $(filter %.so,$^) | $(AWK) -f $< > $@; \
+ LC_ALL=C $(READELF) -W -D -s $(filter %.so,$^) | $(AWK) -f $< > $@; \
$(evaluate-test)
$(objpfx)db-symbols.v.i: db-symbols.awk
diff --git a/nptl_db/db-symbols.awk b/nptl_db/db-symbols.awk
index 6f326cf379..2033f95e38 100644
--- a/nptl_db/db-symbols.awk
+++ b/nptl_db/db-symbols.awk
@@ -13,7 +13,7 @@ BEGIN {
in_symtab = 0;
}
-/Symbol table '.symtab'/ { in_symtab=1; next }
+/Symbol table for image/ { in_symtab=1; next }
NF == 0 { in_symtab=0; next }
!in_symtab { next }
@@ -24,6 +24,7 @@ END {
status = 0;
for (s in required) {
+ s = s "@@GLIBC_PRIVATE"
if (s in seen) print s, "ok";
else {
status = 1;
@@ -33,6 +34,7 @@ END {
any = "";
for (s in th_unique) {
+ s = s "@@GLIBC_PRIVATE"
if (s in seen) {
any = s;
break;
diff --git a/nptl_db/structs.def b/nptl_db/structs.def
index 6a726f207e..e2e51acc39 100644
--- a/nptl_db/structs.def
+++ b/nptl_db/structs.def
@@ -77,7 +77,7 @@ DB_STRUCT (td_eventbuf_t)
DB_STRUCT_FIELD (td_eventbuf_t, eventnum)
DB_STRUCT_FIELD (td_eventbuf_t, eventdata)
-DB_SYMBOL (nptl_version)
+DB_SYMBOL (__nptl_version)
DB_MAIN_SYMBOL (__nptl_create_event)
DB_MAIN_SYMBOL (__nptl_death_event)
DB_SYMBOL (__nptl_threads_events)
diff --git a/nptl_db/td_ta_new.c b/nptl_db/td_ta_new.c
index 501d922ea2..eeca29d5a0 100644
--- a/nptl_db/td_ta_new.c
+++ b/nptl_db/td_ta_new.c
@@ -39,7 +39,7 @@ td_ta_new (struct ps_prochandle *ps, td_thragent_t **ta)
LOG ("td_ta_new");
/* Check whether the versions match. */
- if (td_lookup (ps, SYM_nptl_version, &versaddr) != PS_OK)
+ if (td_lookup (ps, SYM___nptl_version, &versaddr) != PS_OK)
return TD_NOLIBTHREAD;
if (ps_pdread (ps, versaddr, versbuf, sizeof (versbuf)) != PS_OK)
return TD_ERR;

View File

@ -1,31 +0,0 @@
Patch series proposed upstream:
<https://sourceware.org/pipermail/libc-alpha/2021-June/127473.html>
Author: Florian Weimer <fweimer@redhat.com>
Date: Wed Jun 9 14:12:46 2021 +0200
nptl_db: Install libthread_db under a regular implementation name
Currently, the name is always libthread_db-1.0.so. It does not change
with the glibc version, like the other libraries.
GDB hard-codes libthread_db.so.1 (the soname), so this change does not
affect loading libthread_db.
Tested on x86_64-linux-gnu, in an environment where the nptl GDB tests
actually run.
diff --git a/nptl_db/Makefile b/nptl_db/Makefile
index ea721c1dcfce6e7b..1f79c018a1f9fe19 100644
--- a/nptl_db/Makefile
+++ b/nptl_db/Makefile
@@ -21,8 +21,6 @@ subdir := nptl_db
include ../Makeconfig
-nptl_db-version = 1.0
-
extra-libs = libthread_db
extra-libs-others := $(extra-libs)

View File

@ -1,78 +0,0 @@
Patch series proposed upstream:
<https://sourceware.org/pipermail/libc-alpha/2021-June/127473.html>
Author: Florian Weimer <fweimer@redhat.com>
Date: Wed Jun 9 14:12:46 2021 +0200
Makerules: Remove lib-version, $(subdir-version)
Also clarify that the “versioned” term refers to the soname, not the glibc
version (which also ends up in the installed file name).
I verified on x86_64-linux-gnu that “make install” produces the same
files.
diff --git a/Makerules b/Makerules
index ca9885436e15784b..d3f29d0b8991efc7 100644
--- a/Makerules
+++ b/Makerules
@@ -982,22 +982,21 @@ install-lib.so := $(filter %.so,$(install-lib:%_pic.a=%.so))
install-lib := $(filter-out %.so %_pic.a,$(install-lib))
ifeq (yes,$(build-shared))
-# Find which .so's have versions.
+# Find which .so's have a version number in their soname.
versioned := $(strip $(foreach so,$(install-lib.so),\
$(patsubst %,$(so),$($(so)-version))))
install-lib.so-versioned := $(filter $(versioned), $(install-lib.so))
install-lib.so-unversioned := $(filter-out $(versioned), $(install-lib.so))
-# For versioned libraries, we install three files:
+# For libraries whose soname have version numbers, we install three files:
# $(inst_libdir)/libfoo.so -- for linking, symlink or ld script
# $(inst_slibdir)/libfoo.so.NN -- for loading by SONAME, symlink
# $(inst_slibdir)/libfoo-X.Y.Z.so -- the real shared object file
-lib-version := $(firstword $($(subdir)-version) $(version))
install-lib-nosubdir: $(install-lib.so-unversioned:%=$(inst_slibdir)/%) \
$(foreach L,$(install-lib.so-versioned),\
$(inst_libdir)/$L \
- $(inst_slibdir)/$(L:.so=)-$(lib-version).so \
+ $(inst_slibdir)/$(L:.so=)-$(version).so \
$(inst_slibdir)/$L$($L-version))
# Install all the unversioned shared libraries.
@@ -1125,7 +1124,6 @@ include $(o-iterator)
generated += $(foreach o,$(versioned),$o$($o-version))
-ifeq (,$($(subdir)-version))
define o-iterator-doit
$(inst_slibdir)/$o$($o-version): $(inst_slibdir)/$(o:.so=)-$(version).so \
$(+force);
@@ -1140,23 +1138,7 @@ $(inst_slibdir)/$(o:.so=)-$(version).so: $(objpfx)$o $(+force);
endef
object-suffixes-left := $(versioned)
include $(o-iterator)
-else
-define o-iterator-doit
-$(inst_slibdir)/$o$($o-version): \
- $(inst_slibdir)/$(o:.so=)-$($(subdir)-version).so $(+force);
- $$(make-shlib-link)
-endef
-object-suffixes-left := $(versioned)
-include $(o-iterator)
-
-define o-iterator-doit
-$(inst_slibdir)/$(o:.so=)-$($(subdir)-version).so: $(objpfx)$o $(+force);
- $$(do-install-program)
-endef
-object-suffixes-left := $(versioned)
-include $(o-iterator)
-endif
-endif
+endif # ifneq (,$(versioned))
define do-install-so
$(do-install-program)

View File

@ -1,131 +0,0 @@
Patch series proposed upstream:
<https://sourceware.org/pipermail/libc-alpha/2021-June/127473.html>
Author: Florian Weimer <fweimer@redhat.com>
Date: Wed Jun 9 14:12:46 2021 +0200
elf: Generalize name-based DSO recognition in ldconfig
This introduces <dl-is_dso.h> and the _dl_is_dso function. A
test ensures that the official names of libc.so, ld.so, and their
versioned names are recognized.
diff --git a/elf/Makefile b/elf/Makefile
index 38d08e03b8979a81..62f7e8a22544ab9d 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -223,7 +223,8 @@ tests += restest1 preloadtest loadfail multiload origtest resolvfail \
tst-single_threaded tst-single_threaded-pthread \
tst-tls-ie tst-tls-ie-dlmopen argv0test \
tst-glibc-hwcaps tst-glibc-hwcaps-prepend tst-glibc-hwcaps-mask \
- tst-tls20 tst-tls21 tst-dlmopen-dlerror tst-dlmopen-gethostbyname
+ tst-tls20 tst-tls21 tst-dlmopen-dlerror tst-dlmopen-gethostbyname \
+ tst-dl-is_dso
# reldep9
tests-internal += loadtest unload unload2 circleload1 \
neededtest neededtest2 neededtest3 neededtest4 \
diff --git a/elf/dl-is_dso.h b/elf/dl-is_dso.h
new file mode 100644
index 0000000000000000..94e00966a16e0df5
--- /dev/null
+++ b/elf/dl-is_dso.h
@@ -0,0 +1,33 @@
+/* Heuristic for recognizing DSO file names.
+ Copyright (C) 2021 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
+ <https://www.gnu.org/licenses/>. */
+
+#include <stdbool.h>
+#include <string.h>
+
+/* Returns true if the file name looks like a DSO name. */
+static bool
+_dl_is_dso (const char *name)
+{
+ /* Recognize lib*.so*, ld-*.so*, ld.so.*, ld64.so.*. ld-*.so*
+ matches both platform dynamic linker names like ld-linux.so.2,
+ and versioned dynamic loader names like ld-2.12.so. */
+ return (((strncmp (name, "lib", 3) == 0 || strncmp (name, "ld-", 3) == 0)
+ && strstr (name, ".so") != NULL)
+ || strncmp (name, "ld.so.", 6) == 0
+ || strncmp (name, "ld64.so.", 8) == 0);
+}
diff --git a/elf/ldconfig.c b/elf/ldconfig.c
index 96bf7700b2efd37a..1037e8d0cf8d28b6 100644
--- a/elf/ldconfig.c
+++ b/elf/ldconfig.c
@@ -43,6 +43,7 @@
#include <ldconfig.h>
#include <dl-cache.h>
#include <dl-hwcaps.h>
+#include <dl-is_dso.h>
#include <dl-procinfo.h>
@@ -842,9 +843,7 @@ search_dir (const struct dir_entry *entry)
subdirectory (if not already processing a glibc-hwcaps
subdirectory)? The dynamic linker is also considered as
shared library. */
- if (((strncmp (direntry->d_name, "lib", 3) != 0
- && strncmp (direntry->d_name, "ld-", 3) != 0)
- || strstr (direntry->d_name, ".so") == NULL)
+ if (!_dl_is_dso (direntry->d_name)
&& (direntry->d_type == DT_REG
|| (entry->hwcaps == NULL
&& !is_hwcap_platform (direntry->d_name))))
diff --git a/elf/tst-dl-is_dso.c b/elf/tst-dl-is_dso.c
new file mode 100644
index 0000000000000000..48d2cc9fbe9edbc6
--- /dev/null
+++ b/elf/tst-dl-is_dso.c
@@ -0,0 +1,35 @@
+/* Test heuristic for recognizing DSO file names.
+ Copyright (C) 2021 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
+ <https://www.gnu.org/licenses/>. */
+
+#include <dl-is_dso.h>
+#include <gnu/lib-names.h>
+#include <support/check.h>
+
+static int
+do_test (void)
+{
+ /* Official ABI names. */
+ TEST_VERIFY (_dl_is_dso (LIBC_SO));
+ TEST_VERIFY (_dl_is_dso (LD_SO));
+ /* Version-based names. The version number does not matter. */
+ TEST_VERIFY (_dl_is_dso ("libc-2.12.so"));
+ TEST_VERIFY (_dl_is_dso ("ld-2.12.so"));
+ return 0;
+}
+
+#include <support/test-driver.c>

View File

@ -1,158 +0,0 @@
Patch series proposed upstream:
<https://sourceware.org/pipermail/libc-alpha/2021-June/127473.html>
Author: Florian Weimer <fweimer@redhat.com>
Date: Wed Jun 9 14:12:46 2021 +0200
Install shared objects under their ABI names
Previously, the installed objects were named like libc-2.33.so,
and the ABI soname libc.so.6 was just a symbolic link.
The Makefile targets to install these symbolic links are no longer
needed after this, so they are removed with this commit. The more
general $(make-link) command (which invokes scripts/rellns-sh) is
retained because other symbolic links are still needed.
diff --git a/INSTALL b/INSTALL
index 56ed01d4386ad8b7..7f054f422d990d8a 100644
--- a/INSTALL
+++ b/INSTALL
@@ -199,6 +199,16 @@ if 'CFLAGS' is specified it must enable optimization. For example:
RELRO and a read-only global offset table (GOT), at the cost of
slightly increased program load times.
+'--disable-major-minor-libraries'
+ Do not install shared objects under file names that contain the
+ major and minor version of the GNU C Library. By default, such
+ names are used, and the names defined by the ABI are provided as
+ symbolic links only. This causes problems with certain package
+ managers during library upgrades and (in particular) downgrades, so
+ this option can be used to install these shared objects directly
+ under their ABI-defined names, without an additional indirection
+ via symbolic links.
+
'--enable-pt_chown'
The file 'pt_chown' is a helper binary for 'grantpt' (*note
Pseudo-Terminals: Allocation.) that is installed setuid root to fix
diff --git a/Makefile b/Makefile
index 242d36de914c516f..c115c652a0b8c1ce 100644
--- a/Makefile
+++ b/Makefile
@@ -109,12 +109,6 @@ elf/ldso_install:
# Ignore the error if we cannot update /etc/ld.so.cache.
ifeq (no,$(cross-compiling))
ifeq (yes,$(build-shared))
-install: install-symbolic-link
-.PHONY: install-symbolic-link
-install-symbolic-link: subdir_install
- $(symbolic-link-prog) $(symbolic-link-list)
- rm -f $(symbolic-link-list)
-
install:
-test ! -x $(elf-objpfx)ldconfig || LC_ALL=C \
$(elf-objpfx)ldconfig $(addprefix -r ,$(install_root)) \
diff --git a/Makerules b/Makerules
index d3f29d0b8991efc7..6efff78fbe44bdca 100644
--- a/Makerules
+++ b/Makerules
@@ -989,14 +989,12 @@ versioned := $(strip $(foreach so,$(install-lib.so),\
install-lib.so-versioned := $(filter $(versioned), $(install-lib.so))
install-lib.so-unversioned := $(filter-out $(versioned), $(install-lib.so))
-# For libraries whose soname have version numbers, we install three files:
+# For libraries whose soname have version numbers, we install two files:
# $(inst_libdir)/libfoo.so -- for linking, symlink or ld script
-# $(inst_slibdir)/libfoo.so.NN -- for loading by SONAME, symlink
-# $(inst_slibdir)/libfoo-X.Y.Z.so -- the real shared object file
+# $(inst_slibdir)/libfoo.so.NN -- for loading by SONAME
install-lib-nosubdir: $(install-lib.so-unversioned:%=$(inst_slibdir)/%) \
$(foreach L,$(install-lib.so-versioned),\
$(inst_libdir)/$L \
- $(inst_slibdir)/$(L:.so=)-$(version).so \
$(inst_slibdir)/$L$($L-version))
# Install all the unversioned shared libraries.
@@ -1029,35 +1027,10 @@ ln -f $(objpfx)/$(@F) $@
endef
endif
-ifeq (yes,$(build-shared))
-ifeq (no,$(cross-compiling))
-symbolic-link-prog := $(elf-objpfx)sln
-symbolic-link-list := $(elf-objpfx)symlink.list
-define make-shlib-link
-echo `$(..)scripts/rellns-sh -p $< $@` $@ >> $(symbolic-link-list)
-endef
-else # cross-compiling
-# We need a definition that can be used by elf/Makefile's install rules.
-symbolic-link-prog = $(LN_S)
-endif
-endif
-ifndef make-shlib-link
-define make-shlib-link
-rm -f $@
-$(LN_S) `$(..)scripts/rellns-sh -p $< $@` $@
-endef
-endif
-
ifdef libc.so-version
-# For a library specified to be version N, install three files:
-# libc.so -> libc.so.N (e.g. libc.so.6)
-# libc.so.6 -> libc-VERSION.so (e.g. libc-1.10.so)
-
-$(inst_slibdir)/libc.so$(libc.so-version): $(inst_slibdir)/libc-$(version).so \
- $(+force)
- $(make-shlib-link)
-$(inst_slibdir)/libc-$(version).so: $(common-objpfx)libc.so $(+force)
+$(inst_slibdir)/libc.so$(libc.so-version): $(common-objpfx)libc.so $(+force)
$(do-install-program)
+
install: $(inst_slibdir)/libc.so$(libc.so-version)
# This fragment of linker script gives the OUTPUT_FORMAT statement
@@ -1125,15 +1098,7 @@ include $(o-iterator)
generated += $(foreach o,$(versioned),$o$($o-version))
define o-iterator-doit
-$(inst_slibdir)/$o$($o-version): $(inst_slibdir)/$(o:.so=)-$(version).so \
- $(+force);
- $$(make-shlib-link)
-endef
-object-suffixes-left := $(versioned)
-include $(o-iterator)
-
-define o-iterator-doit
-$(inst_slibdir)/$(o:.so=)-$(version).so: $(objpfx)$o $(+force);
+$(inst_slibdir)/$o$($o-version): $(objpfx)$o $(+force);
$$(do-install-program)
endef
object-suffixes-left := $(versioned)
diff --git a/elf/Makefile b/elf/Makefile
index 1751f5ec6772eceb..02f634c19241949f 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -628,20 +628,14 @@ $(objpfx)trusted-dirs.st: Makefile $(..)Makeconfig
CPPFLAGS-dl-load.c += -I$(objpfx). -I$(csu-objpfx).
ifeq (yes,$(build-shared))
-$(inst_slibdir)/$(rtld-version-installed-name): $(objpfx)ld.so $(+force)
+$(inst_rtlddir)/$(rtld-installed-name): $(objpfx)ld.so $(+force)
$(make-target-directory)
$(do-install-program)
-$(inst_rtlddir)/$(rtld-installed-name): \
- $(inst_slibdir)/$(rtld-version-installed-name) \
- $(inst_slibdir)/libc-$(version).so
- $(make-target-directory)
- $(make-shlib-link)
-
# Special target called by parent to install just the dynamic linker.
.PHONY: ldso_install
ldso_install: $(inst_rtlddir)/$(rtld-installed-name)
-endif
+endif # $(build-shared)
# Workarounds for ${exec_prefix} expansion in configure variables.

View File

@ -1,4 +1,4 @@
%define glibcsrcdir glibc-2.33.9000-805-g2c16cb88a6
%define glibcsrcdir glibc-2.33.9000-836-geb68d7d23c
%define glibcversion 2.33.9000
# Pre-release tarballs are pulled in from git using a command that is
# effectively:
@ -111,7 +111,7 @@
Summary: The GNU libc libraries
Name: glibc
Version: %{glibcversion}
Release: 29%{?dist}
Release: 36%{?dist}
# In general, GPLv2+ is used by programs, LGPLv2+ is used for
# libraries.
@ -190,12 +190,6 @@ Patch23: glibc-python3.patch
Patch29: glibc-fedora-nsswitch.patch
Patch30: glibc-deprecated-selinux-makedb.patch
Patch31: glibc-deprecated-selinux-nscd.patch
Patch34: glibc-nosymlink-1.patch
Patch35: glibc-nosymlink-2.patch
Patch36: glibc-nosymlink-3.patch
Patch37: glibc-nosymlink-4.patch
Patch38: glibc-libthread_db-dynsym.patch
Patch39: glibc-iconvconfig-corruption.patch
##############################################################################
# Continued list of core "glibc" package information:
@ -1655,7 +1649,7 @@ done
###############################################################################
# Static libraries that land in glibc-devel, not glibc-static.
devel_static_library_pattern='/lib\(\(c\|nldbl\|mvec\)_nonshared\|g\|ieee\|mcheck\|pthread\|dl\)\.a$'
devel_static_library_pattern='/lib\(\(c\|nldbl\|mvec\)_nonshared\|g\|ieee\|mcheck\|pthread\|dl\|rt\|util\)\.a$'
# Static libraries neither in glibc-devel nor in glibc-static.
other_static_library_pattern='/libpthread_nonshared\.a'
@ -2213,6 +2207,65 @@ fi
%files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared
%changelog
* Wed Jun 30 2021 Florian Weimer <fweimer@redhat.com> - 2.33.9000-36
- Auto-sync with upstream branch master,
commit eb68d7d23cc411acdf68a60f194343a6774d6194:
- Linux: Avoid calling malloc indirectly from __get_nprocs (#1975693)
- Use Linux 5.13 in build-many-glibcs.py
* Wed Jun 30 2021 Florian Weimer <fweimer@redhat.com> - 2.33.9000-35
- Drop glibc-s390x-roundeven.patch, applied upstream.
- Move libutil.a into glibc-devel.
- Auto-sync with upstream branch master,
commit 734c60ebb607086ad6d67b2544d6b7baba72a652:
- login: Move libutil into libc
- login: Rework hidden prototypes for __setutent, __utmpname, __endutent
- login: Hidden prototypes for _getpt, __ptsname_r, grantpt, unlockpt
- nptl_db: Re-use the ELF-to-abilist converter for ABI checking
- Add RFC 8335 Definitions from Linux 5.13
- nss: Fix NSS_DECLARE_MODULE_FUNCTIONS handling of _nss_*_endnetgrent
- s390x: Update math: redirect roundeven function
- posix: Add _Fork [BZ #4737]
* Mon Jun 28 2021 Florian Weimer <fweimer@redhat.com> - 2.33.9000-34
- Move librt.a to glibc-devel (#1977058)
* Mon Jun 28 2021 Florian Weimer <fweimer@redhat.com> - 2.33.9000-33
- Dropped patches glibc-nosymlink-*.patch, glibc-iconvconfig-corruption.patch,
glibc-libthread_db-dynsym-*.patch; applied upstream.
- Auto-sync with upstream branch master,
commit dd45734e322a03287d34d8af9b7da7b35cfddb8e:
- nptl: Add glibc.pthread.stack_cache_size tunable
- nptl: Export libthread_db-used symbols under GLIBC_PRIVATE
- nptl: Rename nptl_version to __nptl_version
- nptl_db: Clean up main/rtld variable handling
- arm: align stack in clone [BZ 28020]
- Linux: Cleanups after librt move
- Linux: Move timer_settime, __timer_settime64 from librt to libc
- Linux: Move timer_gettime, __timer_gettime64 from librt to libc
- Linux: Move timer_getoverrun from librt to libc
- Linux: Move timer_create, timer_delete from librt to libc
- Linux: Define TIMER_T_WAS_INT_COMPAT in kernel-posix-timers.h
- Install shared objects under their ABI names
- elf: Generalize name-based DSO recognition in ldconfig
- Makerules: Remove lib-version, $(subdir-version)
- nptl_db: Install libthread_db under a regular implementation name
- iconvconfig: Fix multiple issues
- wordexp: handle overflow in positional parameter number (bug 28011)
- Update math: redirect roundeven function
- Use GCC builtins for roundeven functions if desired.
- x86_64: roundeven with sse4.1 support
- math: redirect roundeven function
* Mon Jun 28 2021 Florian Weimer <fweimer@redhat.com> - 2.33.9000-32
- Switch to new version of libthread_db .dynsym patch
* Mon Jun 28 2021 Florian Weimer <fweimer@redhat.com> - 2.33.9000-31
- Further .symtab adjustment: Keep all __GI_* symbols (#1975859)
* Mon Jun 28 2021 Florian Weimer <fweimer@redhat.com> - 2.33.9000-30
- Keep most of .symtab in libc.so.6 (#1975859)
* Sun Jun 27 2021 Florian Weimer <fweimer@redhat.com> - 2.33.9000-29
- Apply emergency patch to fix iconvconfig corruption

View File

@ -1 +1 @@
SHA512 (glibc-2.33.9000-805-g2c16cb88a6.tar.xz) = 50431e03ec0e32b2d6c9aed85cc219536d9a896d3c692dc162ea4435a7a5673972fd04f766968f05b264b52eb2306c704eebed74a4916578cf95a96ce92a4d5f
SHA512 (glibc-2.33.9000-836-geb68d7d23c.tar.xz) = 59f066611bb2c9f590ea9f4ff79d85f97cbf03d6e5900dca93da8a1baec6aa53f5d607d8efbc37720933b82992ff944ac96e1ab600ea21d435e88e8915068cfb

View File

@ -11,7 +11,7 @@
# after debuginfo extraction.
#
# For libc.so.6, a set of strategic symbols is preserved in .symtab
# that are frequently used in valgrind suppressions.
# that are frequently used in valgrind suppressions and elsewhere.
set -ex
@ -74,62 +74,20 @@ cp "$libc_tmp" "$libc_path"
objcopy --merge-notes "$ldso_path"
objcopy --merge-notes "$libc_path"
# libc.so.6: Reduce to strategic symbols needed by valgrind.
# pthread_create is needed to trigger loading of libthread_db in GDB.
# (Debuginfo is gone after this, so no need to optimize it.)
strip \
-K __GI___rawmemchr \
-K __GI___strcasecmp_l \
-K __GI___strncasecmp_l \
-K __GI_memchr \
-K __GI_memcmp \
-K __GI_memcpy \
-K __GI_memmove \
-K __GI_mempcpy \
-K __GI_stpcpy \
-K __GI_strcasecmp \
-K __GI_strcasecmp_l \
-K __GI_strcat \
-K __GI_strchr \
-K __GI_strcmp \
-K __GI_strcpy \
-K __GI_strcspn \
-K __GI_strlen \
-K __GI_strncasecmp \
-K __GI_strncasecmp_l \
-K __GI_strncmp \
-K __GI_strncpy \
-K __GI_strnlen \
-K __GI_strrchr \
-K __GI_wcsnlen \
-K __GI_wmemchr \
-K __memcmp_sse2 \
-K __memcmp_sse4_1 \
-K __memcpy_avx_unaligned_erms \
-K __memcpy_chk \
-K __memcpy_sse2 \
-K __memmove_chk \
-K __stpcpy_chk \
-K __stpcpy_sse2 \
-K __stpcpy_sse2_unaligned \
-K __strchr_sse2 \
-K __strchr_sse2_no_bsf \
-K __strcmp_sse2 \
-K __strcmp_sse42 \
-K __strcpy_chk \
-K __strlen_sse2 \
-K __strlen_sse2_no_bsf \
-K __strlen_sse42 \
-K __strncmp_sse2 \
-K __strncmp_sse42 \
-K __strncpy_sse2 \
-K __strncpy_sse2_unaligned \
-K __strrchr_sse2 \
-K __strrchr_sse2_no_bsf \
-K __strrchr_sse42 \
-K __strstr_sse2 \
-K __strstr_sse42 \
-K pthread_create \
# libc.so.6: Reduce to valuable symbols. Eliminate file symbols,
# annobin symbols, and symbols used by the glibc build to implement
# hidden aliases (__EI_*). We would also like to remove __GI_*
# symbols, but even listing them explicitly (as in -K __GI_strlen)
# still causes strip to remove them, so there is no filtering of
# __GI_* here. (Debuginfo is gone after this, so no need to optimize
# it.)
strip -w \
-K '*' \
-K '!*.c' \
-K '!*.os' \
-K '!.annobin_*' \
-K '!__EI_*' \
-K '!__PRETTY_FUNCTION__*' \
"$libc_path"
# ld.so: Rewrite the source file paths to match the extracted