update to glibc-2.17-323.1.al7.1

Signed-off-by: zhaohang <1209176326@qq.com>
This commit is contained in:
赵航 2021-09-09 14:23:25 +08:00 committed by Liwei Ge
parent ff0128648f
commit 8c29e492e2
60 changed files with 7244 additions and 176 deletions

43
glibc-rh1406732-6.patch Normal file
View file

@ -0,0 +1,43 @@
This is a downstream only patch for RHEL 7.
See bug 1790475 for the history behind --disable-bind-now for ppc64.
In summary: COPY relocations and BIND_NOW are incompatible on ppc64.
The solution is to globally disable BIND_NOW hardening on ppc64 with
--disable-bind-now and then use a downstream-only patch to partially
enable BIND_NOW hardening for ppc64 to the level of hardening that
works given the toolchain.
diff --git a/sysdeps/powerpc/Makefile b/sysdeps/powerpc/Makefile
index b11edd77bd2c22d4..47a9e7bcf66a8531 100644
--- a/sysdeps/powerpc/Makefile
+++ b/sysdeps/powerpc/Makefile
@@ -1,3 +1,29 @@
+################################################################################
+# Only enabled if we are not building for ppc64le.
+ifeq (,$(filter %le,$(config-machine)))
+# Enable bind-now behaviour by default for POWER. This is a downstream specific
+# change that is required due to a toolchain limitation in handling COPY
+# relocations and BIND_NOW (see rhbz#1790475).
+LDCFLAGS-c.so += -Wl,-z,now
+# Likewise. Take care that this is carefully selected to turn BIND_NOW back on
+# for ld.so without turning it back on for libpthread.so which has the
+# problematic OPD that generates a COPY relocation. Enable these only for the
+# elf subdir which is also used to build libc.so.6. This avoids enabling
+# BIND_NOW for libpthread.
+ifeq ($(subdir),elf)
+z-now-no = -Wl,-z,now
+LDFLAGS-lib.so += -Wl,-z,now
+link-extra-flags += -Wl,-z,now
+endif
+# Likewise. Take care that this is carefully selected to turn BIND_NOW
+# back on for iconv modules to ensure the data-only DSOs have consistently the
+# correct expected flags for DSOs (even if they don't really need them).
+ifeq ($(subdir),iconvdata)
+LDFLAGS.so += -Wl,-z,now
+endif
+endif
+################################################################################
+
ifeq ($(subdir),string)
CFLAGS-memcmp.c += -Wno-uninitialized
endif