Compare commits

...

10 Commits

Author SHA1 Message Date
Carlos O'Donell 705d9bacad Auto-sync with upstream branch release/2.36/master
Upstream commit: e05036b194559cbfcdfcfb1b920d37b939e3e35c

- time: Set daylight to 1 for matching DST/offset change (bug 29951)
- elf/tst-tlsopt-powerpc fails when compiled with -mcpu=power10 (BZ# 29776)
- x86: Fix -Os build (BZ #29576)
- sunrpc: Suppress GCC -Os warning on user2netname
- locale: prevent maybe-uninitialized errors with -Os [BZ #19444]
- time: Use 64 bit time on tzfile
- nscd: Use 64 bit time_t on libc nscd routines (BZ# 29402)
- nis: Build libnsl with 64 bit time_t
- Apply asm redirections in syslog.h before first use [BZ #27087]
- x86: Fix wcsnlen-avx2 page cross length comparison [BZ #29591]
- elf: Fix rtld-audit trampoline for aarch64
2023-01-10 23:58:29 -05:00
Arjun Shankar 668d9e7ea6 Auto-sync with upstream branch release/2.36/master
Upstream commit: 0f90d6204d79223fd32248c774df0cb7f0e604de

- Linux: Support __IPC_64 in sysvctl *ctl command arguments (bug 29771)
- mktime: improve heuristic for ca-1986 Indiana DST
- Makerules: fix MAKEFLAGS assignment for upcoming make-4.4 [BZ# 29564]
- LoongArch: Fix ABI related macros in elf.h to keep consistent with binutils[1].
- linux: Fix fstatat on MIPSn64 (BZ #29730)
- longlong.h: update from GCC for LoongArch clz/ctz support
- elf: Reinstate on DL_DEBUG_BINDINGS _dl_lookup_symbol_x
- linux: Fix generic struct_stat for 64 bit time (BZ# 29657)
- Avoid undefined behaviour in ibm128 implementation of llroundl (BZ #29488)
- Fix BZ #29463 in the ibm128 implementation of y1l too
- elf: Do not completely clear reused namespace in dlmopen (bug 29600)
- nss: Use shared prefix in IPv4 address in tst-reload1
- nss: Fix tst-nss-files-hosts-long on single-stack hosts (bug 24816)
- nss: Implement --no-addrconfig option for getent
- Ensure calculations happen with desired rounding mode in y1lf128
2022-11-14 16:31:45 +01:00
Carlos O'Donell a9713abfbd Enable ELF DT_HASH for shared objects and the dynamic loader (#2129358)
Resolves: #2129358
2022-10-17 15:33:14 -04:00
Arjun Shankar 68af9439be Auto-sync with upstream branch release/2.36/master
Upstream commit: 2bd815d8347851212b9a91dbdca8053f4dbdac87

- nscd: Drop local address tuple variable [BZ #29607]
- x86-64: Require BMI1/BMI2 for AVX2 strrchr and wcsrchr implementations
- x86-64: Require BMI2 and LZCNT for AVX2 memrchr implementation
- x86-64: Require BMI2 for AVX2 (raw|w)memchr implementations
- x86-64: Require BMI2 for AVX2 wcs(n)cmp implementations
- x86-64: Require BMI2 for AVX2 strncmp implementation
- x86-64: Require BMI2 for AVX2 strcmp implementation
- x86-64: Require BMI2 for AVX2 str(n)casecmp implementations
- x86: include BMI1 and BMI2 in x86-64-v3 level
- hppa: undef __ASSUME_SET_ROBUST_LIST
- hppa: Fix initialization of dp register [BZ 29635]
- stdlib: Fix __getrandom_nocancel type and arc4random usage (BZ #29638)
- get_nscd_addresses: Fix subscript typos [BZ #29605]
- m68k: Enforce 4-byte alignment on internal locks (BZ #29537)
- gconv: Use 64-bit interfaces in gconv_parseconfdir (bug 29583)
- elf: Implement force_first handling in _dl_sort_maps_dfs (bug 28937)
- elf: Rename _dl_sort_maps parameter from skip to force_first
- scripts/dso-ordering-test.py: Generate program run-time dependencies
- elf: Fix hwcaps string size overestimation
2022-10-07 14:16:52 +02:00
Florian Weimer dcbc4ee9f0 Do not require .annobin symbols in wrap-find-debuginfo.sh 2022-09-23 13:15:53 +02:00
Florian Weimer 51bba7af4c Remove .annobin* symbols from ld.so (#2126477) 2022-09-23 07:16:34 +02:00
Florian Weimer 6559823220 Use a temporary directory in wrap-find-debuginfo.sh
This avoids the need for separate variables for all files.
2022-09-23 07:15:39 +02:00
Florian Weimer 32602d51fd Auto-sync with upstream branch release/2.36/master (#2115752, #2126522)
Upstream commit: df51334828f2af214105aad82042140ee3a6de0a

- elf: Run tst-audit-tlsdesc, tst-audit-tlsdesc-dlopen everywhere
- NEWS: Note bug 12154 and bug 29305 as fixed
- resolv: Fix building tst-resolv-invalid-cname for earlier C standards
- nss_dns: Rewrite _nss_dns_gethostbyname4_r using current interfaces
- resolv: Add new tst-resolv-invalid-cname
- nss_dns: In gaih_getanswer_slice, skip strange aliases (bug 12154)
- nss_dns: Rewrite getanswer_r to match getanswer_ptr (bug 12154, bug 29305)
- nss_dns: Remove remnants of IPv6 address mapping
- nss_dns: Rewrite _nss_dns_gethostbyaddr2_r and getanswer_ptr
- nss_dns: Split getanswer_ptr from getanswer_r
- resolv: Add DNS packet parsing helpers geared towards wire format
- resolv: Add internal __ns_name_length_uncompressed function
- resolv: Add the __ns_samebinaryname function
- resolv: Add internal __res_binary_hnok function
- resolv: Add tst-resolv-aliases
- resolv: Add tst-resolv-byaddr for testing reverse lookup
- nscd: Fix netlink cache invalidation if epoll is used [BZ #29415]
- Add NEWS entry for CVE-2022-39046
- syslog: Remove extra whitespace between timestamp and message (BZ#29544)
- elf: Restore how vDSO dependency is printed with LD_TRACE_LOADED_OBJECTS (BZ #29539)
- Apply asm redirections in wchar.h before first use (rhbz#2115752)
- elf: Call __libc_early_init for reused namespaces (bug 29528)
- syslog: Fix large messages (BZ#29536)
- Linux: Fix enum fsconfig_command detection in <sys/mount.h> (rhbz#2126522)
- linux: Fix sys/mount.h usage with kernel headers (rhbz#2126522)
- linux: Use compile_c_snippet to check linux/mount.h availability
- linux: Mimic kernel defition for BLOCK_SIZE
- linux: Use compile_c_snippet to check linux/pidfd.h availability
- glibcextract.py: Add compile_c_snippet
2022-09-14 10:44:35 +02:00
Arjun Shankar 5bcb836ffa Retain libc.so.6 debuglink section, remove ld.so debuginfo file (#2090744)
This commit fixes wrap-find-debuginfo.sh so that:
* the .gnu_debuglink section of libc.so.6 is retained, and
* the redundant debuginfo file generated for ld.so is removed

Co-Authored-By: Benjamin Herrenschmidt <benh@amazon.com>
Reviewed-by: Florian Weimer <fweimer@redhat.com>

Rawhide commit: 8e2d77f734
2022-09-06 17:49:02 +02:00
Arjun Shankar 1ca10cc71c Auto-sync with upstream branch release/2.36/master
Upstream commit: 5c62874f423af93e97b51bc9a57af228a546156f

- NEWS: Add entry for bug 28846
- socket: Check lengths before advancing pointer in CMSG_NXTHDR
- alpha: Fix generic brk system call emulation in __brk_call (bug 29490)
- Linux: Terminate subprocess on late failure in tst-pidfd (bug 29485)
- elf: Replace `strcpy` call with `memcpy` [BZ #29454]
- Update syscall lists for Linux 5.19
- dlfcn: Pass caller pointer to static dlopen implementation (bug 29446)
2022-08-23 11:10:29 +02:00
3 changed files with 156 additions and 7 deletions

View File

@ -1,4 +1,4 @@
%global glibcsrcdir glibc-2.36-2-g33f1b4c145
%global glibcsrcdir glibc-2.36-83-ge05036b194
%global glibcversion 2.36
# Pre-release tarballs are pulled in from git using a command that is
# effectively:
@ -159,7 +159,7 @@ Version: %{glibcversion}
# - It allows using the Release number without the %%dist tag in the dependency
# generator to make the generated requires interchangeable between Rawhide
# and ELN (.elnYY < .fcXX).
%global baserelease 1
%global baserelease 9
Release: %{baserelease}%{?dist}
# In general, GPLv2+ is used by programs, LGPLv2+ is used for
@ -1192,7 +1192,16 @@ build()
--disable-nscd ||
{ cat config.log; false; }
%make_build -r %{glibc_make_flags}
# We enable DT_GNU_HASH and DT_HASH for ld.so and DSOs to improve
# compatibility with applications that expect DT_HASH e.g. Epic Games
# Easy Anti-Cheat. This is temporary as applications move to
# supporting only DT_GNU_HASH. This was initially enabled in Fedora
# 37. We must use 'env' because it is the only way to pass, via the
# environment, two variables that set the initial Makefile values for
# LDFLAGS used to build shared objects and the dynamic loader.
env LDFLAGS.so="-Wl,--hash-style=both" \
LDFLAGS-rtld="-Wl,--hash-style=both" \
%make_build -r %{glibc_make_flags}
popd
}
@ -2185,6 +2194,118 @@ update_gconv_modules_cache ()
%files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared
%changelog
* Tue Jan 10 2023 Carlos O'Donell <carlos@redhat.com> - 2.36-9
- Auto-sync with upstream branch release/2.36/master,
commit e05036b194559cbfcdfcfb1b920d37b939e3e35c:
- time: Set daylight to 1 for matching DST/offset change (bug 29951)
- elf/tst-tlsopt-powerpc fails when compiled with -mcpu=power10 (BZ# 29776)
- x86: Fix -Os build (BZ #29576)
- sunrpc: Suppress GCC -Os warning on user2netname
- locale: prevent maybe-uninitialized errors with -Os [BZ #19444]
- time: Use 64 bit time on tzfile
- nscd: Use 64 bit time_t on libc nscd routines (BZ# 29402)
- nis: Build libnsl with 64 bit time_t
- Apply asm redirections in syslog.h before first use [BZ #27087]
- x86: Fix wcsnlen-avx2 page cross length comparison [BZ #29591]
- elf: Fix rtld-audit trampoline for aarch64
* Mon Nov 14 2022 Arjun Shankar <arjun@redhat.com> - 2.36-8
- Auto-sync with upstream branch release/2.36/master,
commit 0f90d6204d79223fd32248c774df0cb7f0e604de:
- Linux: Support __IPC_64 in sysvctl *ctl command arguments (bug 29771)
- mktime: improve heuristic for ca-1986 Indiana DST
- Makerules: fix MAKEFLAGS assignment for upcoming make-4.4 [BZ# 29564]
- LoongArch: Fix ABI related macros in elf.h to keep consistent with binutils[1].
- linux: Fix fstatat on MIPSn64 (BZ #29730)
- longlong.h: update from GCC for LoongArch clz/ctz support
- elf: Reinstate on DL_DEBUG_BINDINGS _dl_lookup_symbol_x
- linux: Fix generic struct_stat for 64 bit time (BZ# 29657)
- Avoid undefined behaviour in ibm128 implementation of llroundl (BZ #29488)
- Fix BZ #29463 in the ibm128 implementation of y1l too
- elf: Do not completely clear reused namespace in dlmopen (bug 29600)
- nss: Use shared prefix in IPv4 address in tst-reload1
- nss: Fix tst-nss-files-hosts-long on single-stack hosts (bug 24816)
- nss: Implement --no-addrconfig option for getent
- Ensure calculations happen with desired rounding mode in y1lf128
* Mon Oct 17 2022 Carlos O'Donell <carlos@redhat.com> - 2.36-7
- Enable ELF DT_HASH for shared objects and the dynamic loader (#2129358)
* Fri Oct 07 2022 Arjun Shankar <arjun@redhat.com> - 2.36-6
- Auto-sync with upstream branch release/2.36/master,
commit 2bd815d8347851212b9a91dbdca8053f4dbdac87:
- nscd: Drop local address tuple variable [BZ #29607]
- x86-64: Require BMI1/BMI2 for AVX2 strrchr and wcsrchr implementations
- x86-64: Require BMI2 and LZCNT for AVX2 memrchr implementation
- x86-64: Require BMI2 for AVX2 (raw|w)memchr implementations
- x86-64: Require BMI2 for AVX2 wcs(n)cmp implementations
- x86-64: Require BMI2 for AVX2 strncmp implementation
- x86-64: Require BMI2 for AVX2 strcmp implementation
- x86-64: Require BMI2 for AVX2 str(n)casecmp implementations
- x86: include BMI1 and BMI2 in x86-64-v3 level
- hppa: undef __ASSUME_SET_ROBUST_LIST
- hppa: Fix initialization of dp register [BZ 29635]
- stdlib: Fix __getrandom_nocancel type and arc4random usage (BZ #29638)
- get_nscd_addresses: Fix subscript typos [BZ #29605]
- m68k: Enforce 4-byte alignment on internal locks (BZ #29537)
- gconv: Use 64-bit interfaces in gconv_parseconfdir (bug 29583)
- elf: Implement force_first handling in _dl_sort_maps_dfs (bug 28937)
- elf: Rename _dl_sort_maps parameter from skip to force_first
- scripts/dso-ordering-test.py: Generate program run-time dependencies
- elf: Fix hwcaps string size overestimation
* Fri Sep 23 2022 Florian Weimer <fweimer@redhat.com> - 2.36-5
- Remove .annobin* symbols from ld.so (#2126477)
* Wed Sep 14 2022 Florian Weimer <fweimer@redhat.com> - 2.36-4
- Auto-sync with upstream branch release/2.36/master,
commit df51334828f2af214105aad82042140ee3a6de0a:
- elf: Run tst-audit-tlsdesc, tst-audit-tlsdesc-dlopen everywhere
- NEWS: Note bug 12154 and bug 29305 as fixed
- resolv: Fix building tst-resolv-invalid-cname for earlier C standards
- nss_dns: Rewrite _nss_dns_gethostbyname4_r using current interfaces
- resolv: Add new tst-resolv-invalid-cname
- nss_dns: In gaih_getanswer_slice, skip strange aliases (bug 12154)
- nss_dns: Rewrite getanswer_r to match getanswer_ptr (bug 12154, bug 29305)
- nss_dns: Remove remnants of IPv6 address mapping
- nss_dns: Rewrite _nss_dns_gethostbyaddr2_r and getanswer_ptr
- nss_dns: Split getanswer_ptr from getanswer_r
- resolv: Add DNS packet parsing helpers geared towards wire format
- resolv: Add internal __ns_name_length_uncompressed function
- resolv: Add the __ns_samebinaryname function
- resolv: Add internal __res_binary_hnok function
- resolv: Add tst-resolv-aliases
- resolv: Add tst-resolv-byaddr for testing reverse lookup
- nscd: Fix netlink cache invalidation if epoll is used [BZ #29415]
- Add NEWS entry for CVE-2022-39046
- syslog: Remove extra whitespace between timestamp and message (BZ#29544)
- elf: Restore how vDSO dependency is printed with LD_TRACE_LOADED_OBJECTS (BZ #29539)
- Apply asm redirections in wchar.h before first use (rhbz#2115752)
- elf: Call __libc_early_init for reused namespaces (bug 29528)
- syslog: Fix large messages (BZ#29536)
- Linux: Fix enum fsconfig_command detection in <sys/mount.h> (rhbz#2126522)
- linux: Fix sys/mount.h usage with kernel headers (rhbz#2126522)
- linux: Use compile_c_snippet to check linux/mount.h availability
- linux: Mimic kernel defition for BLOCK_SIZE
- linux: Use compile_c_snippet to check linux/pidfd.h availability
- glibcextract.py: Add compile_c_snippet
* Tue Sep 06 2022 Arjun Shankar <arjun@redhat.com> - 2.36-3
- Co-Authored-By: Benjamin Herrenschmidt <benh@amazon.com>
- Retain .gnu_debuglink section in libc.so.6 (#2090744)
- Remove redundant ld.so debuginfo file (#2090744)
* Tue Aug 23 2022 Arjun Shankar <arjun@redhat.com> - 2.36-2
- Auto-sync with upstream branch release/2.36/master,
commit 5c62874f423af93e97b51bc9a57af228a546156f:
- NEWS: Add entry for bug 28846
- socket: Check lengths before advancing pointer in CMSG_NXTHDR
- alpha: Fix generic brk system call emulation in __brk_call (bug 29490)
- Linux: Terminate subprocess on late failure in tst-pidfd (bug 29485)
- elf: Replace `strcpy` call with `memcpy` [BZ #29454]
- Update syscall lists for Linux 5.19
- dlfcn: Pass caller pointer to static dlopen implementation (bug 29446)
* Wed Aug 03 2022 Carlos O'Donell <carlos@redhat.com> - 2.36-1
- Auto-sync with upstream branch release/2.36/master,
commit 33f1b4c1452b33991e670f636ebe98b90a405e10:

View File

@ -1 +1 @@
SHA512 (glibc-2.36-2-g33f1b4c145.tar.xz) = 92d2f25a69722404d3d8f2112a5fc1bebaa6a8b5900e9303d06598179d490631d58b5f17a4d58fa8dd552485bfb8ca1bd3c28093b54f9621a6ebd388a0e28ab1
SHA512 (glibc-2.36-83-ge05036b194.tar.xz) = 719cf523416b653c74e17277c26a8129fb188bf41118933c3c325e8131a8b716ba90c8f39f25a01972aa269d1115c726d16b889018ab67af8fcc2d6deedd3505

View File

@ -15,8 +15,10 @@
set -ex
ldso_tmp="$(mktemp)"
libc_tmp="$(mktemp)"
workdir="$(mktemp -d -t find_debuginfo.XXXXXX)"
ldso_tmp="$workdir/ld.so"
libc_tmp="$workdir/libc.so"
# Prefer a separately installed debugedit over the RPM-integrated one.
if command -v debugedit >/dev/null ; then
@ -26,7 +28,7 @@ else
fi
cleanup () {
rm -f "$ldso_tmp" "$libc_tmp"
rm -rf "$workdir"
}
trap cleanup 0
@ -66,6 +68,10 @@ cp "$libc_path" "$libc_tmp"
# Run the debuginfo extraction.
"$script_path" "$@"
# libc.so.6: Extract the .gnu_debuglink section
objcopy -j.gnu_debuglink --set-section-flags .gnu_debuglink=alloc \
-O binary "$libc_path" "$libc_tmp.debuglink"
# Restore the original files.
cp "$ldso_tmp" "$ldso_path"
cp "$libc_tmp" "$libc_path"
@ -74,6 +80,23 @@ cp "$libc_tmp" "$libc_path"
objcopy --merge-notes "$ldso_path"
objcopy --merge-notes "$libc_path"
# libc.so.6: Restore the .gnu_debuglink section
objcopy --add-section .gnu_debuglink="$libc_tmp.debuglink" "$libc_path"
# ld.so does not have separated debuginfo and so the debuginfo file
# generated by find-debuginfo is redundant. Therefore, remove it.
ldso_debug=
for ldso_debug_candidate in `find "$sysroot_path" -regextype posix-extended \
-regex '.*/ld(-.*|64|)\.so\.[0-9]+.*debug$' -type f` ; do
if test -z "$ldso_debug" ; then
ldso_debug="$ldso_debug_candidate"
else
echo "error: multiple ld.so debug candidates: $ldso_debug, $ldso_debug_candidate"
exit 1
fi
done
rm -f "$ldso_debug"
# 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_*
@ -112,6 +135,11 @@ while true ; do
done
debug_base_name=${last_arg:-$RPM_BUILD_ROOT}
$debugedit -b "$debug_base_name" -d "$debug_dest_name" -n $ldso_path
# Remove the .annobin* symbols (and only them).
if nm --format=just-symbols "$ldso_path" \
| grep '^\.annobin' > "$ldso_tmp.annobin-symbols"; then
objcopy --strip-symbols="$ldso_tmp.annobin-symbols" "$ldso_path"
fi
# Apply single-file DWARF optimization.
dwz $ldso_path