Skip to content

Commit

Permalink
Update to glibc-2.28-72.el8_1.1.src.rpm
Browse files Browse the repository at this point in the history
  • Loading branch information
sdwru committed May 5, 2020
1 parent cd9fcb5 commit a9e4834
Show file tree
Hide file tree
Showing 446 changed files with 35,034 additions and 4,372 deletions.
24 changes: 24 additions & 0 deletions BUILD/glibc-2.28/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
2019-03-25 Mike Crowe <[email protected]>

* nptl/tst-rwlock14.c (do_test): Replace duplicate calls to
pthread_rwlock_timedrdlock with calls to
pthread_rwlock_timedwrlock to ensure that the latter is tested
too. Use new function name in diagnostic messages too.

2019-01-31 Carlos O'Donell <[email protected]>
Torvald Riegel <[email protected]>
Rik Prohaska <[email protected]>

[BZ# 23844]
* nptl/Makefile (tests): Add tst-rwlock-tryrdlock-stall, and
tst-rwlock-trywrlock-stall.
* nptl/pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock):
Wake waiters if PTHREAD_RWLOCK_FUTEX_USED is set.
* nptl/pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock):
Set __wrphase_fute to 1 only if we started the write phase.
* nptl/tst-rwlock-tryrdlock-stall.c: New file.
* nptl/tst-rwlock-trywrlock-stall.c: New file.
* support/Makefile (libsupport-routines): Add xpthread_rwlock_destroy.
* support/xpthread_rwlock_destroy.c: New file.
* support/xthread.h: Declare xpthread_rwlock_destroy.

2018-08-01 Carlos O'Donel <[email protected]>

* version.h (RELEASE): Set to "stable".
Expand Down
8 changes: 4 additions & 4 deletions BUILD/glibc-2.28/INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ if 'CFLAGS' is specified it must enable optimization. For example:
protection.

'--enable-bind-now'
Disable lazy binding for installed shared objects. This provides
additional security hardening because it enables full RELRO and a
read-only global offset table (GOT), at the cost of slightly
increased program load times.
Disable lazy binding for installed shared objects and programs.
This provides additional security hardening because it enables full
RELRO and a read-only global offset table (GOT), at the cost of
slightly increased program load times.

'--enable-pt_chown'
The file 'pt_chown' is a helper binary for 'grantpt' (*note
Expand Down
49 changes: 33 additions & 16 deletions BUILD/glibc-2.28/Makeconfig
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,8 @@ endif
# test modules.
ifeq ($(bind-now),yes)
LDFLAGS-lib.so += -Wl,-z,now
# Extra flags for dynamically linked non-test main programs.
link-extra-flags += -Wl,-z,now
endif

# Command to run after every final link (executable or shared object).
Expand All @@ -413,7 +415,7 @@ link-extra-libs-tests = $(libsupport)

# Command for linking PIE programs with the C library.
ifndef +link-pie
+link-pie-before-libc = $(CC) $(if $($(@F)-no-pie),$(no-pie-ldflag),-pie) \
+link-pie-before-libc = $(if $($(@F)-no-pie),$(no-pie-ldflag),-pie) \
-Wl,-O1 -nostdlib -nostartfiles -o $@ \
$(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
$(combreloc-LDFLAGS) $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \
Expand All @@ -426,23 +428,24 @@ ifndef +link-pie
$(link-extra-libs)
+link-pie-after-libc = $(+postctorS) $(+postinit)
define +link-pie
$(+link-pie-before-libc) $(rtld-LDFLAGS) $(link-libc) $(+link-pie-after-libc)
$(CC) $(link-libc-rpath-link) $(+link-pie-before-libc) $(rtld-LDFLAGS) \
$(link-extra-flags) $(link-libc) $(+link-pie-after-libc)
$(call after-link,$@)
endef
define +link-pie-tests
$(+link-pie-before-libc) $(rtld-tests-LDFLAGS) $(link-libc-tests) \
$(+link-pie-after-libc)
$(CC) $(+link-pie-before-libc) $(rtld-tests-LDFLAGS) $(link-libc-tests) \
$(+link-pie-after-libc)
$(call after-link,$@)
endef
define +link-pie-printers-tests
$(+link-pie-before-libc) $(built-rtld-LDFLAGS) $(link-libc-printers-tests) \
$(+link-pie-after-libc)
$(CC) $(+link-pie-before-libc) $(built-rtld-LDFLAGS) \
$(link-libc-printers-tests) $(+link-pie-after-libc)
$(call after-link,$@)
endef
endif
# Command for statically linking programs with the C library.
ifndef +link-static
+link-static-before-libc = $(CC) -nostdlib -nostartfiles -static -o $@ \
+link-static-before-libc = -nostdlib -nostartfiles -static -o $@ \
$(if $($(@F)-no-pie),$(no-pie-ldflag),$(default-pie-ldflag)) \
$(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
$(firstword $(CRT-$(@F)) $(csu-objpfx)$(real-static-start-installed-name)) \
Expand All @@ -454,11 +457,13 @@ ifndef +link-static
$(link-extra-libs-static)
+link-static-after-libc = $(+postctorT) $(+postinit)
define +link-static
$(+link-static-before-libc) $(link-libc-static) $(+link-static-after-libc)
$(CC) $(+link-static-before-libc) $(link-extra-flags) $(link-libc-static) \
$(+link-static-after-libc)
$(call after-link,$@)
endef
define +link-static-tests
$(+link-static-before-libc) $(link-libc-static-tests) $(+link-static-after-libc)
$(CC) $(+link-static-before-libc) $(link-libc-static-tests) \
$(+link-static-after-libc)
$(call after-link,$@)
endef
endif
Expand All @@ -473,7 +478,7 @@ ifeq (yes,$(build-pie-default))
+link-tests = $(+link-pie-tests)
+link-printers-tests = $(+link-pie-printers-tests)
else # not build-pie-default
+link-before-libc = $(CC) -nostdlib -nostartfiles -o $@ \
+link-before-libc = -nostdlib -nostartfiles -o $@ \
$(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
$(combreloc-LDFLAGS) $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \
$(firstword $(CRT-$(@F)) $(csu-objpfx)$(start-installed-name)) \
Expand All @@ -485,16 +490,17 @@ else # not build-pie-default
$(link-extra-libs)
+link-after-libc = $(+postctor) $(+postinit)
define +link
$(+link-before-libc) $(rtld-LDFLAGS) $(link-libc) $(+link-after-libc)
$(CC) $(link-libc-rpath-link) $(+link-before-libc) $(rtld-LDFLAGS) \
$(link-extra-flags) $(link-libc) $(+link-after-libc)
$(call after-link,$@)
endef
define +link-tests
$(+link-before-libc) $(rtld-tests-LDFLAGS) $(link-libc-tests) \
$(CC) $(+link-before-libc) $(rtld-tests-LDFLAGS) $(link-libc-tests) \
$(+link-after-libc)
$(call after-link,$@)
endef
define +link-printers-tests
$(+link-before-libc) $(built-rtld-LDFLAGS) $(link-libc-printers-tests) \
$(CC) $(+link-before-libc) $(built-rtld-LDFLAGS) $(link-libc-printers-tests) \
$(+link-after-libc)
$(call after-link,$@)
endef
Expand Down Expand Up @@ -546,6 +552,15 @@ ifeq (yes,$(build-shared))
link-libc-rpath = -Wl,-rpath=$(rpath-link)
link-libc-rpath-link = -Wl,-rpath-link=$(rpath-link)

# For programs which are not tests, $(link-libc-rpath-link) is added
# directly in $(+link), $(+link-pie) above, so that -Wl,-rpath-link
# comes before the expansion of LDLIBS-* and affects libraries added
# there. For shared objects, -Wl,-rpath-link is added via
# $(build-shlib-helper) and $(build-module-helper) in Makerules (also
# before the expansion of LDLIBS-* variables).

# Tests use -Wl,-rpath instead of -Wl,-rpath-link for
# build-hardcoded-path-in-tests.
ifeq (yes,$(build-hardcoded-path-in-tests))
link-libc-tests-rpath-link = $(link-libc-rpath)
else
Expand All @@ -556,7 +571,7 @@ link-libc-before-gnulib = $(common-objpfx)libc.so$(libc.so-version) \
$(common-objpfx)$(patsubst %,$(libtype.oS),c) \
$(as-needed) $(elf-objpfx)ld.so \
$(no-as-needed)
link-libc = $(link-libc-rpath-link) $(link-libc-before-gnulib) $(gnulib)
link-libc = $(link-libc-before-gnulib) $(gnulib)

link-libc-tests-after-rpath-link = $(link-libc-before-gnulib) $(gnulib-tests)
link-libc-tests = $(link-libc-tests-rpath-link) \
Expand Down Expand Up @@ -831,8 +846,10 @@ endif
# disable any optimization that assume default rounding mode.
+math-flags = -frounding-math

# Build libc/libm using -fno-math-errno, but run testsuite with -fmath-errno.
+extra-math-flags = $(if $(filter libnldbl nonlib testsuite,$(in-module)),-fmath-errno,-fno-math-errno)
# Logically only "libnldbl", "nonlib" and "testsuite" should be using
# -fno-math-errno. However due to GCC bug #88576, only "libm" can use
# -fno-math-errno.
+extra-math-flags = $(if $(filter libm,$(in-module)),-fno-math-errno,-fmath-errno)

# We might want to compile with some stack-protection flag.
ifneq ($(stack-protector),)
Expand Down
12 changes: 10 additions & 2 deletions BUILD/glibc-2.28/benchtests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,21 @@ bench-func: $(binaries-bench)
scripts/benchout.schema.json; \
fi

$(timing-type) $(binaries-bench) $(binaries-benchset) \
$(binaries-bench-malloc): %: %.o $(objpfx)json-lib.o \
ifeq ($(bind-now),yes)
link-bench-bind-now = -Wl,-z,now
endif

bench-link-targets = $(timing-type) $(binaries-bench) $(binaries-benchset) \
$(binaries-bench-malloc)

$(bench-link-targets): %: %.o $(objpfx)json-lib.o \
$(link-extra-libs-tests) \
$(sort $(filter $(common-objpfx)lib%,$(link-libc))) \
$(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
$(+link-tests)

$(bench-link-targets): LDFLAGS += $(link-bench-bind-now)

$(objpfx)bench-%.c: %-inputs $(bench-deps)
{ if [ -n "$($*-INCLUDE)" ]; then \
cat $($*-INCLUDE); \
Expand Down
12 changes: 12 additions & 0 deletions BUILD/glibc-2.28/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,28 @@
/* Define if assembler supports AVX512DQ. */
#undef HAVE_AVX512DQ_ASM_SUPPORT

/* Define if assembler supports z10 zarch instructions as default on S390. */
#undef HAVE_S390_MIN_Z10_ZARCH_ASM_SUPPORT

/* Define if assembler supports z196 zarch instructions as default on S390. */
#undef HAVE_S390_MIN_Z196_ZARCH_ASM_SUPPORT

/* Define if assembler supports z13 zarch instructions as default on S390. */
#undef HAVE_S390_MIN_Z13_ZARCH_ASM_SUPPORT

/* Define if assembler supports arch13 zarch instruction as default on S390. */
#undef HAVE_S390_MIN_ARCH13_ZARCH_ASM_SUPPORT

/* Define if assembler supports vector instructions on S390. */
#undef HAVE_S390_VX_ASM_SUPPORT

/* Define if gcc supports vector registers as clobbers in inline assembly
on S390. */
#undef HAVE_S390_VX_GCC_SUPPORT

/* Define if assembler supports arch13 instructions on S390. */
#undef HAVE_S390_ARCH13_ASM_SUPPORT

/* Define if assembler supports Intel MPX. */
#undef HAVE_MPX_SUPPORT

Expand Down
29 changes: 21 additions & 8 deletions BUILD/glibc-2.28/dlfcn/dlerror.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,16 @@ __dlerror (void)
__libc_once (once, init);

/* Get error string. */
result = (struct dl_action_result *) __libc_getspecific (key);
if (result == NULL)
result = &last_result;
if (static_buf != NULL)
result = static_buf;
else
{
/* init () has been run and we don't use the static buffer.
So we have a valid key. */
result = (struct dl_action_result *) __libc_getspecific (key);
if (result == NULL)
result = &last_result;
}

/* Test whether we already returned the string. */
if (result->returned != 0)
Expand Down Expand Up @@ -230,13 +237,19 @@ free_key_mem (void *mem)
void
__dlerror_main_freeres (void)
{
void *mem;
/* Free the global memory if used. */
check_free (&last_result);
/* Free the TSD memory if used. */
mem = __libc_getspecific (key);
if (mem != NULL)
free_key_mem (mem);

if (__libc_once_get (once) && static_buf == NULL)
{
/* init () has been run and we don't use the static buffer.
So we have a valid key. */
void *mem;
/* Free the TSD memory if used. */
mem = __libc_getspecific (key);
if (mem != NULL)
free_key_mem (mem);
}
}

struct dlfcn_hook *_dlfcn_hook __attribute__((nocommon));
Expand Down
12 changes: 2 additions & 10 deletions BUILD/glibc-2.28/elf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,6 @@ others-extras = $(ldconfig-modules)
endif
endif

# This needs to be statically linked because it is executed at a time
# when there might be incompatible shared objects on disk, and the
# purpose of this program is to remove them (among other things).
others-static += glibc_post_upgrade
others += glibc_post_upgrade
glibc_post_upgrade-modules := static-stubs
CFLAGS-glibc_post_upgrade.c += -DGCONV_MODULES_DIR='"$(gconvdir)"'

# To find xmalloc.c and xstrdup.c
vpath %.c ../locale/programs

Expand All @@ -133,6 +125,7 @@ install-others += $(inst_auditdir)/sotruss-lib.so
install-bin-script += sotruss
generated += sotruss
libof-sotruss-lib = extramodules
LDFLAGS-sotruss-lib.so += $(z-now-$(bind-now))
$(objpfx)sotruss-lib.so: $(objpfx)sotruss-lib.os
$(build-module-asneeded)
$(objpfx)sotruss-lib.so: $(common-objpfx)libc.so $(objpfx)ld.so \
Expand Down Expand Up @@ -200,6 +193,7 @@ tests-internal += loadtest unload unload2 circleload1 \
neededtest neededtest2 neededtest3 neededtest4 \
tst-tls3 tst-tls6 tst-tls7 tst-tls8 tst-dlmopen2 \
tst-ptrguard1 tst-stackguard1 tst-libc_dlvsym
tests-container += tst-pldd
ifeq ($(build-hardcoded-path-in-tests),yes)
tests += tst-dlopen-aout
tst-dlopen-aout-no-pie = yes
Expand Down Expand Up @@ -576,8 +570,6 @@ $(objpfx)sln: $(sln-modules:%=$(objpfx)%.o)

$(objpfx)ldconfig: $(ldconfig-modules:%=$(objpfx)%.o)

$(objpfx)glibc_post_upgrade: $(glibc_post_upgrade-modules:%=$(objpfx)%.o)

SYSCONF-FLAGS := -D'SYSCONFDIR="$(sysconfdir)"'
CFLAGS-ldconfig.c += $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' \
-D'SLIBDIR="$(slibdir)"'
Expand Down
Loading

0 comments on commit a9e4834

Please sign in to comment.