Compare commits

...

109 Commits

Author SHA1 Message Date
80e2ed7c86
Move riscv64 lp64d symlink to filesystem package
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2024-11-30 15:02:05 +02:00
176969ead3
Merge remote-tracking branch 'up/main' into main-riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2024-11-30 15:00:39 +02:00
Florian Weimer
3315b0dd11 Auto-sync with upstream branch master
Upstream commit: e2436d6f5aa47ce8da80c2ba0f59dfb9ffde08f3

- Drop glibc-rh2327564-1.patch, glibc-rh2327564-2.patch.  Fixed upstream.
  (#2327564)

- malloc: send freed small chunks to smallbin
- AArch64: Remove zva_128 from memset
- benchtests: Add calloc test
- libio: make _IO_least_marker static
- malloc: Avoid func call for tcache quick path in free()
- math: Add internal roundeven_finite
- RISC-V: Use builtin for fma and fmaf
- RISC-V: Use builtin for copysign and copysignf
- Silence most -Wzero-as-null-pointer-constant diagnostics
- sysdeps: linux: Fix output of LD_SHOW_AUXV=1 for AT_RSEQ_*
- nptl: initialize cpu_id_start prior to rseq registration
- math: Fix branch hint for 68d7128942
- powerpc64le: ROP Changes for strncpy/ppc-mount
- math: Fix non-portability in the computation of signgam in lgammaf
- malloc: Split _int_free() into 3 sub functions
- math: Use tanf from CORE-MATH
- math: Use lgammaf from CORE-MATH
- math: Use erfcf from CORE-MATH
- math: Use erff from CORE-MATH
- math: Split s_erfF in erff and erfc
- math: Use cbrtf from CORE-MATH
- benchtests: Add tanf benchmark
- benchtests: Add lgammaf benchmark
- benchtests: Add erfcf benchmark
- benchtests: Add erff benchmark
- benchtests: Add cbrtf benchmark
- elf: Handle static PIE with non-zero load address [BZ #31799]
- x86/string: Use `movsl` instead of `movsd` in strncat [BZ #32344]
- stdlib: Make getenv thread-safe in more cases
- aarch64: Remove non-temporal load/stores from oryon-1's memset
- aarch64: Remove non-temporal load/stores from oryon-1's memcpy
- powerpc64le: _init/_fini file changes for ROP
- misc: remove extra va_end in error_tail (bug 32233)
- intl: avoid alloca for arbitrary sizes (bug 32380)
2024-11-29 15:22:34 +01:00
Florian Weimer
01e1915f67 Correct patch names (#2327564) 2024-11-21 21:13:35 +01:00
Florian Weimer
88d869c1c2 Revert aarch64 memset changes (cec3aef3241cec3aef32412779e) (#2327564) 2024-11-21 20:09:48 +01:00
Florian Weimer
0e9c278a7e Auto-sync with upstream branch master
Upstream commit: 47311cca31e685fa7bfe19bb8cef17d2d3d7fff9

- manual: Add description of AArch64-specific pkey flags
- AArch64: Add support for memory protection keys
- AArch64: Remove thunderx{,2} memcpy
- powerpc64le: Optimized strcat for POWER10
- powerpc: Improve the inline asm for syscall wrappers
- elf: handle addition overflow in _dl_find_object_update_1 [BZ #32245]
- x86/string: Use `movsl` instead of `movsd` in strncpy/strncat [BZ #32344]
- manual: Fix overeager s/int/size_t/ in memory.texi
- linux: Add support for getrandom vDSO
2024-11-20 14:07:52 +01:00
Florian Weimer
736b65ab4b Only relocate ld.so for the second time of libc.so has been loaded 2024-11-13 17:50:00 +01:00
DJ Delorie
d48dfabacb Auto-sync with upstream branch master,
Upstream commit: 7b544224f82d20019f9b28522ebf8114a372d1a2

- stat.h: Fix missing declaration of struct timespec
- mach: Fix __xpg_strerror_r on in-range but undefined errors [BZ #32350]
- x86/string: Use `movsl` instead of `movsd` [BZ #32344]
- Rename new tst-sem17 test to tst-sem18
- Avoid uninitialized result in sem_open when file does not exist
- nptl: initialize rseq area prior to registration
- s390x: Update ulps
- elf: avoid jumping over a needed declaration
- math: Fix log10f on some ABIs
- stdio-common: Add tests for formatted vsnprintf output specifiers
- stdio-common: Add tests for formatted vsprintf output specifiers
- stdio-common: Add tests for formatted vfprintf output specifiers
- stdio-common: Add tests for formatted vdprintf output specifiers
- stdio-common: Add tests for formatted vasprintf output specifiers
- stdio-common: Add tests for formatted vprintf output specifiers
- stdio-common: Add tests for formatted snprintf output specifiers
- stdio-common: Add tests for formatted sprintf output specifiers
- stdio-common: Add tests for formatted fprintf output specifiers
- stdio-common: Add tests for formatted dprintf output specifiers
- stdio-common: Add tests for formatted asprintf output specifiers
- stdio-common: Add tests for formatted printf output specifiers
- nptl: fix __builtin_thread_pointer detection on LoongArch
- math: Fix incorrect results of exp10m1f with some GCC versions
- misc: Align argument name for pkey_*() functions with the manual
- manual: Use more precise wording for memory protection keys
- elf: Switch to main malloc after final ld.so self-relocation
- elf: Introduce _dl_relocate_object_no_relro
- elf: Do not define consider_profiling, consider_symbind as macros
- elf: rtld_multiple_ref is always true
- Add Arm HWCAP2_* constants from Linux 3.15 and 6.2 to <bits/hwcap.h>
- Add feature test macro _ISOC2Y_SOURCE
- added license for sysdeps/ieee754/flt-32/e_gammaf_r.c
- AArch64: Remove SVE erf and erfc tables
- x86_64: Add exp2m1f with FMA
- x86_64: Add exp10m1f with FMA
- math: Use log10p1f from CORE-MATH
- math: Use log1pf from CORE-MATH
- math: Use log2p1f from CORE-MATH
- math: Use log10f from CORE-MATH
- math: Use expm1f from CORE-MATH
- math: Use exp2m1f from CORE-MATH
- math: Use exp10m1f from CORE-MATH
- benchtests: Add log10p1f benchmark
- benchtests: Add log1p benchmark
- benchtests: Add log2p1f benchmark
- benchtests: Add log10f benchmark
- benchtests: Add expm1f benchmark
- benchtests: Add exp2m1f benchmark
- benchtests: Add exp10m1f benchmark
- math: Add e_gammaf_r to glibc code and style
- LoongArch: Add RSEQ_SIG in rseq.h.
- nptl: Add <thread_pointer.h> for LoongArch
- Link tst-clock_gettime with $(librt)
- powerpc64: Obviate the need for ROP protection in clone/clone3
- Add tests of time, gettimeofday, clock_gettime
- Add more tests of pthread attributes initial values
- Document further requirement on mixing streams / file descriptors
- powerpc64le: Adhere to ABI stack alignment requirement
- AArch64: Small optimisation in AdvSIMD erf and erfc
- Revert "elf: Run constructors on cyclic recursive dlopen (bug 31986)"
- elf: Change ldconfig auxcache magic number (bug 32231)
- SHARED-FILES: Mention bundled Linux 6.10 headers.
- libio: Fix crash in fputws [BZ #20632]
- stdio-common: Fix scanf parsing for NaN types [BZ #30647]
2024-11-12 14:18:35 -05:00
Florian Weimer
cd8af7b147 Exclude 32-bit headers from the x86_64 package
The files in glibc-devel.x86_64 caused the llvm architecture detection
to fail.  It also changes the error message back to the familiar:

/usr/include/gnu/stubs.h:7:11: fatal error: gnu/stubs-32.h:
  No such file or directory

Instead of the new one:

/usr/bin/ld: cannot find crt1.o: No such file or directory
2024-11-04 17:08:57 +01:00
Martin Coufal
7a7420d7f4 Regression/bz434601-timedlock-segfault: use pthread in compilation
We use fedora tests for RHEL testing as well and some of the older
releases do not have libpthread -> libc merge, so we need the '-pthread'
option to compile the tests successfully.
2024-10-29 09:08:50 +00:00
Florian Weimer
a766afca02 Use rpm.spawn instead of posix.fork if availabe (#2291869) 2024-10-28 13:55:42 +01:00
Florian Weimer
1fcc972d48 Eliminate glibc-headers and related packages
The headers are identical except for <gnu/lib-names-32.h> and
<gnu/stubs-32.h>.  Having those in glibc-devel.x86_64 as well should
be harmless.  RPM is expected to handle the identical files shared
between glibc-devel.x86_64 and glibc-devel.i686 because it's needed
for pretty much every other -devel package.
2024-10-28 13:53:43 +01:00
Florian Weimer
8a4e95401c Restore compatibility with libglvnd 2024-10-26 15:57:37 +02:00
Florian Weimer
dce3a85f6a Add missing upstream commit description 2024-10-26 15:57:23 +02:00
Florian Weimer
9dacf7e4e9 Define macros that are expanded during source RPM construction for noarch
Otherwise, building source RPMs in Koji chokes on directives such as

Provides: %{glibc_ldso}

even though these entries are not relevant to source RPMs.
2024-10-26 01:22:06 +02:00
Florian Weimer
0a6148145d Use UsrMove (Changes/UsrMerge) path destination in the RPMs (#1063607)
This commit updates most occurrences of /%{_lib} to %{_libdir}.
The glibc build process is not changed, instead the symbolic links
are created right before installing the files, to redirect them
to their final locations.  The symbolic links are removed again
so that they do not end up in the shipped packages.
2024-10-25 22:22:21 +02:00
Florian Weimer
328b9681ee Rework filelist construction
Eliminate most pattern matching and list files explicitly.  Two
common exceptions are modeled explicitly: libmvec (additional shared
object and static library), libnldbl (additional shared object).

To implement glibc-headers-* and glibc-gconv-extra, pattern matching
is still used, but with helper shell functions that allow splitting
the matching and non-matching files into separate list files.  Some
complications arise because the build for glibc32.x86_64 installs
header files into /usr/include that shouldn't land in the regular
development packages.

The remaining differences are bug fixes for directory ownership.

/usr/libexec/glibc-benchtests is now owned by glibc-benchtests.
/lib64/glibc-hwcaps is now owned by glibc.ppc64le.

Differences can be checked with this script:

mkdir -p filelist
for x in "$@" ; do
    target="$(rpm -qp --qf 'filelist/%{name}.%{arch}.txt' "$x")"
    rpm -qp --qf '[%{filenames} %{filemodes:perms} (%{fileflags:fflags})(%{fileverifyflags:hex}) \{%{filecaps}\} %{fileusername} %{filegroupname}\n]' "$x" > "$target"
done

Note: Delete the *.src.rpm files because %{arch} has unexpected
results for them.
2024-10-25 22:19:41 +02:00
Florian Weimer
1cbb8b9347 Do not build and run xtests explicitly
Upstream builds them unconditionally as part of make check.
2024-10-25 22:18:50 +02:00
Florian Weimer
ba9b5e45af Auto-sync with upstream branch master
Upstream commit: ac73067cb7a328bf106ecd041c020fc61be7e087

- elf: Fix map_complete Systemtap probe in dl_open_worker
2024-10-25 17:53:45 +02:00
Florian Weimer
267a95236f Auto-sync with upstream branch master
Upstream commit: 43db5e2c0672cae7edea7c9685b22317eae25471

- elf: Signal RT_CONSISTENT after relocation processing in dlopen (bug 31986)
- elf: Signal LA_ACT_CONSISTENT to auditors after RT_CONSISTENT switch
- elf: Run constructors on cyclic recursive dlopen (bug 31986)
- Linux: Match kernel text for SCHED_ macros
- libio: Correctly link tst-popen-fork against libpthread
2024-10-25 17:24:49 +02:00
Patsy Griffin
581f21ada7 Auto-sync with upstream branch master
sUpstream commit: c5dd659f22058bf9b371ab1cba07631f1206c674

- Add more tests of pthread_mutexattr_gettype and pthread_mutexattr_settype
- libio: Fix a deadlock after fork in popen
- configure: default to --prefix=/usr on GNU/Linux
- manual: Document stdio.h functions that may be macros
- Check time arguments to pthread_timedjoin_np and pthread_clockjoin_np
- Add .b4-config file
- linux: Fix tst-syscall-restart.c on old gcc (BZ 32283)
- sparc: Fix restartable syscalls (BZ 32173)
- support: Make support_process_state_wait return the found state
- Enable transliteration rules with two input characters in scn_IT [BZ #32280]
2024-10-24 16:57:16 -04:00
DJ Delorie
74a6204fdb Auto-sync with upstream branch master
Upstream commit 9d4b4515a88c5d0bbfc7809374f322c507c2d779

- locale: Fix some spelling typos
- LoongArch: Regenerate loongarch/arch-syscall.h by build-many-glibcs.py update-syscalls.
- manual: Fix and test @deftypef* function formatting
- replace tgammaf by the CORE-MATH implementation
- Add IPPROTO_SMC from Linux 6.11 to netinet/in.h
- misc: Add support for Linux uio.h RWF_ATOMIC flag
- linux: Update stat-generic.h with linux 6.11
- Update kernel version to 6.11 in header constant tests
- linux: Add MAP_DROPPABLE from Linux 6.11
- Update PIDFD_* constants for Linux 6.11
- Update syscall lists for Linux 6.11
- Use Linux 6.11 in build-many-glibcs.py
- Fix header guard in sysdeps/mach/hurd/x86_64/vm_param.h
- rt: more clock_nanosleep tests addendum
- rt: more clock_nanosleep tests
- stdlib: Make abort/_Exit AS-safe (BZ 26275)
- linux: Use GLRO(dl_vdso_time) on time
- linux: Use GLRO(dl_vdso_gettimeofday) on gettimeofday
- S390: Don't use r11 for cu-instructions as used as frame-pointer. [BZ# 32192]
- stdio-common/Makefile: Fix FAIL: lint-makefiles
- Fix whitespace related license issues.
- Add freopen special-case tests: thread cancellation
- hurd: Add missing va_end call in fcntl implementation. [BZ #32234]
2024-10-14 13:30:51 -04:00
Carlos O'Donell
563b4e6c6f Auto-sync with upstream branch master
Upstream commit: a36814e1455093fc9ebfcdf6ef39bb0cf3d447da

- riscv: align .preinit_array (bug 32228)
- linux: sparc: Fix clone for LEON/sparcv8 (BZ 31394)
- linux: sparc: Fix syscall_cancel for LEON
- math: Improve layout of expf data
- Disable _TIME_BITS if the compiler defaults to it
- Disable _FILE_OFFSET_BITS if the compiler defaults to it
- Do not use -Wp to disable fortify (BZ 31928)
- libio: Set _vtable_offset before calling _IO_link_in [BZ #32148]
- Add a new fwrite test that exercises buffer overflow
- x86/string: Fixup alignment of main loop in str{n}cmp-evex [BZ #32212]
- stdio-common: Fix memory leak in tst-freopen4* tests on UNSUPPORTED
- Linux: Block signals around _Fork (bug 32215)
- Update to Unicode 16.0.0 [BZ #32168]
- manual: Document that feof and ferror are mutually exclusive
- stdio-common: Add new test for fdopen
- Fix missing randomness in __gen_tempname (bug 32214)
- arc: Cleanup arcbe
- arc: Remove HAVE_ARC_BE macro and disable big-endian port
- scripts: Remove arceb-linux-gnu from build-many-glibcs.py
- LoongArch: Undef __NR_fstat and __NR_newfstatat.
- Add tests of fread
2024-10-02 16:11:30 -04:00
Arjun Shankar
39bab0c46f Auto-sync with upstream branch master
Upstream commit: da29dc24d419656a4a6d6d61598b767b86b1425d

- nptl: Prefer setresuid32 in tst-setuid2
- elf: Move __rtld_malloc_init_stubs call into _dl_start_final
- elf: Eliminate alloca in open_verify
- elf: Remove version assert in check_match in elf/dl-lookup.c
- elf: In rtld_setup_main_map, assume ld.so has a DYNAMIC segment
- misc: Enable internal use of memory protection keys
- misc: Link tst-mkstemp-fuse-parallel with $(shared-thread-library)
- iconv: Use $(run-program-prefix) for running iconv (bug 32197)
- AArch64: Simplify rounding-multiply pattern in several AdvSIMD routines
- AArch64: Improve codegen in users of ADVSIMD expm1f helper
- AArch64: Improve codegen in users of AdvSIMD log1pf helper
- AArch64: Improve codegen in SVE F32 logs
- AArch64: Improve codegen in SVE expf & related routines
- Linux: readdir64_r should not skip d_ino == 0 entries (bug 32126)
- dirent: Add tst-rewinddir
- dirent: Add tst-readdir-long
- Linux: Use readdir64_r for compat __old_readdir64_r (bug 32128)
- dirent: Add tst-closedir-leaks
- support: Add valgrind instructions to <support/fuse.h>
- support: Fix memory leaks in FUSE tests
- misc: FUSE-based tests for mkstemp
- Add freopen special-case tests: chroot, EFBIG, stdin/stdout/stderr
- Make tst-strtod-underflow type-generic
- Add tests of more strtod special cases
- Add more tests of strtod end pointer
- Make tst-strtod2 and tst-strtod5 type-generic
- Implement run-built-tests=no for make xcheck, always build xtests
- Test that errno is set to 0 at program startup
- Add another test for fclose on an unopened file
2024-09-24 16:03:42 +02:00
Florian Weimer
7d2f238156 Auto-sync with upstream branch master
Upstream commit: fa1b0d5e9f6e0353e16339430770a7a8824c0468

- iconv: Input buffering for the iconv program (bug 6050)
- iconv: Multiple - on command line should not fail (bug 32050)
- iconv: Support in-place conversions (bug 10460, bug 32033)
- iconv: Preserve iconv -c error exit on invalid inputs (bug 32046)
- manual: __is_last is no longer part of iconv internals
- iconv: Do not use mmap in iconv (the program) (bug 17703)
- iconv: Base tests for buffer management
- AArch64: Add vector logp1 alias for log1p
- Linux: Add missing scheduler constants to <sched.h>
- Linux: Add the sched_setattr and sched_getattr functions
- manual: Extract the @manpageurl{func,sec} macro
- AArch64: Remove memset-reg.h
- debug: Fix read error handling in pcprofiledump
- AArch64: Optimize memset
- aarch64: Avoid redundant MOVs in AdvSIMD F32 logs
- Document limitations on streams passed to freopen
- stdlib: Do not use GLIBC_PRIVATE ABI for errno in libc_nonshared.a
- manual: Safety annotations for clock_gettime, clock_getres
- timezone: sync to TZDB 2024b
- Fix freopen handling of ,ccs= (bug 23675)
- powerpc64le: Build new strtod tests with long double ABI flags (bug 32145)
2024-09-20 15:34:02 +02:00
Martin Coufal
8587305be0 tests/: relevancy updates
Rhel testing requires some relevancy updates in following tests:
* tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7
* tests/Regression/bz1988382-annocheck-reports-pie-pic-test-failures-on
* tests/Regression/bz2007417-glibc-ldd-segfaults-when-inspecting
* tests/Regression/bz2024347-glibc-Optional-sched-getcpu-acceleration-using
* tests/Regression/bz2027789-glibc-backtrace-function-crashes-without-vdso-on
* tests/Sanity/bz2023420-glibc-Backport-ld-so-list-diagnostics
2024-09-20 13:29:17 +00:00
Florian Weimer
3ebbe38af2 Fix typo in rpmbuild.xcheck.log dumping 2024-09-19 13:53:19 +02:00
Florian Weimer
e4aaff0fdb Use make xcheck in such a way that xtests are actually built 2024-09-19 13:22:59 +02:00
Florian Weimer
e2bae39a8f Ensure that xtests can be built 2024-09-19 10:36:00 +02:00
Florian Weimer
88814acb29 Auto-sync with upstream branch master
Upstream commit: 9c0d6f7a1046aba111e25e34ec07242853e859dc

- Fix memory leak on freopen error return (bug 32140)
- Clear flags2 flags set from mode in freopen (bug 32134)
- Linux: readdir_r needs to report getdents failures (bug 32124)
- libio: Attempt wide backup free only for non-legacy code
- Do not set errno for overflowing NaN payload in strtod/nan (bug 32045)
- powerpc64: Fix syscall_cancel build for powerpc64le-linux-gnu [BZ #32125]
- Fix strtod subnormal rounding (bug 30220)
- manual: Add Descriptor-Relative Access section
- x86: Enable non-temporal memset for Hygon processors
- x86: Add cache information support for Hygon processors
- x86: Add new architecture type for Hygon processors
- powerpc64: Optimize strcpy and stpcpy for Power9/10
- nptl: Fix Race conditions in pthread cancellation [BZ#12683]
- x86: Unifies 'strnlen-evex' and 'strnlen-evex512' implementations.
- string: strerror, strsignal cannot use buffer after dlmopen (bug 32026)
- ungetc: Fix backup buffer leak on program exit [BZ #27821]
- ungetc: Fix uninitialized read when putting into unused streams [BZ #27821]
- x86: Add `Avoid_STOSB` tunable to allow NT memset without ERMS
- x86: Use `Avoid_Non_Temporal_Memset` to control non-temporal path
- x86: Fix bug in strchrnul-evex512 [BZ #32078]
- manual: Document dprintf and vdprintf
- manual: Document generic printf error codes
- ARC: Regenerate ULPs
- support: Add options list terminator to the test driver
- Define __libc_initial for the static libc
- Turn on -Wimplicit-fallthrough by default if available
- elf: Remove struct dl_init_args from elf/dl-open.c
- nptl: Fix stray process left by tst-cancel7 blocking testing
- nptl: Reorder semaphore release in tst-cancel7
- sysdeps: Re-flow and sort multiline gnu/Makefile definitions
- login: Re-flow and sort multiline Makefile definitions
- benchtests: Add random memset benchmark
- AArch64: Improve generic strlen
- rtld: Fix handling of '--' option
- manual/stdio: Further clarify putc, putwc, getc, and getwc
- stdlib: Allow concurrent quick_exit (BZ 31997)
- elf: Avoid re-initializing already allocated TLS in dlopen (bug 31717)
- elf: Clarify and invert second argument of _dl_allocate_tls_init
- Fix name space violation in fortify wrappers (bug 32052)
- iconv: Fix matching of multi-character transliterations (bug 31859)
- x86: Tunables may incorrectly set Prefer_PMINUB_for_stringop (bug 32047)
- x86: Add missing switch/case fall-through markers to init_cpu_features
- stdlib: Link tst-concurrent-exit with $(shared-thread-library)
- hurd: Fix missing pthread_ compat symbol in libc
- resolv: Fix tst-resolv-short-response for older GCC (bug 32042)
- Add mremap tests
- mremap: Update manual entry
- linux: Update the mremap C implementation [BZ #31968]
- Enhanced test coverage for strncmp, wcsncmp
- Enhance test coverage for strnlen, wcsnlen
- stdlib: Mark `abort` as `cold`
- stdlib: Allow concurrent exit (BZ 31997)
- Add F_DUPFD_QUERY from Linux 6.10 to bits/fcntl-linux.h
- Add STATX_SUBVOL from Linux 6.10 to bits/statx-generic.h
- Update syscall lists for Linux 6.10
- assert: Mark `__assert_fail` as `cold`
- x86-64: Remove sysdeps/x86_64/x32/dl-machine.h
2024-09-05 13:44:23 +02:00
Sergey Kolosov
76510cb6c3 CI Tests: mark tests for tiers 2024-08-04 17:48:06 +02:00
Patsy Griffin
59ad86c69b Auto-sync with upstream branch release/2.40/master
Upstream commit: 132a72f93cb4ad9f16b8469dc061de5f75f6a44e

- manual: make setrlimit() description less ambiguous
- manual/stdio: Clarify putc and putwc
- malloc: add multi-threaded tests for aligned_alloc/calloc/malloc
- malloc: avoid global locks in tst-aligned_alloc-lib.c
2024-07-31 13:17:16 -04:00
Florian Weimer
03bf7e6cdf Stub resolver configuration updates (RHEL-18039)
- Support clearing options in /etc/resolv.conf, RES_OPTIONS with a - prefix
- Introduce the strict-error/RES_STRICTERR stub resolver option
2024-07-26 14:00:09 +02:00
Florian Weimer
82b4bc76c0 Auto-sync with upstream branch release/2.40/master
Upstream commit: 145b5886379c8de4f0a1bca3556a4c3d7b6c24b2

- manual: Do not mention STATIC_TLS in dynamic linker hardening recommendations
- resolv: Do not wait for non-existing second DNS response after error (bug 30081)
- resolv: Allow short error responses to match any query (bug 31890)
- Increase version number to 2.40
- libc.pot: regenerate (only line number changes)
- x86: Disable non-temporal memset on Skylake Server
2024-07-26 09:48:59 +02:00
Arjun Shankar
c9bf6af606 ppc64le: Build early startup code with -mcpu=power8
The --with-rtld-early-cflags configure option was being passed for ppc64
builds instead of for ppc64le.  This commit fixes that.
2024-07-18 14:32:52 +02:00
DJ Delorie
20389a2e21 Merge #106 CI Tests: removes outdated glibc-debuginfo-common dependency 2024-07-17 22:08:45 +00:00
DJ Delorie
a9efe40115 Auto-sync with upstream branch master
Upstream commit: a11e15ea0ab1ee8a1947b6be52beca53693f0991

- math: Update alpha ulps
- hurd: Fix restoring message to be retried
- nptl: Convert tst-sem11 and tst-sem12 tests to use the test driver
- nptl: Add copyright notice tst-sem11 and tst-sem12 tests
- tests: XFAIL audit tests failing on all mips configurations, bug 29404
- time/Makefile: Split and sort tests
- s390x: Fix segfault in wcsncmp [BZ #31934]
2024-07-15 21:57:47 -04:00
Zbigniew Jędrzejewski-Szmek
8f78a55fb6 Rebuilt for the bin-sbin merge (again)
https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin
2024-07-13 13:02:45 +02:00
Sergey Kolosov
6544ca1016 CI Tests: Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc: adds support for latest distros 2024-07-10 15:41:18 +02:00
Sergey Kolosov
ecb359903b CI Tests: Regression/bz1612448-glibc-debuginfo-does-not-have-gdb-index: use require instead of recommend 2024-07-10 15:41:18 +02:00
Sergey Kolosov
c6d9960c4a CI Tests: Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value: use require instead of recommend 2024-07-10 15:41:18 +02:00
Sergey Kolosov
2112d49089 CI Tests: Regression/bz1612448-glibc-debuginfo-does-not-have-gdb-index: removes outdated glibc-debuginfo-common dependency 2024-07-10 15:41:18 +02:00
Sergey Kolosov
2d64356328 CI Tests: Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value: removes outdated glibc-debuginfo-common dependency 2024-07-10 15:41:18 +02:00
Sergey Kolosov
aaf67f6194 CI Tests: Regression/bz1612448-glibc-debuginfo-does-not-have-gdb-index: removes outdated glibc-debuginfo-common dependency 2024-07-10 15:41:18 +02:00
Sergey Kolosov
a6d2abe702 CI Tests: Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value: removes outdated glibc-debuginfo-common dependency 2024-07-10 15:41:18 +02:00
Florian Weimer
04dd5dc667 Auto-sync with upstream branch master
Upstream commit: 2e456ccf0c34a056e3ccafac4a0c7effef14d918

- Linux: Make __rseq_size useful for feature detection (bug 31965)
- po: incorporate translations (bg)
- manual: add syscalls
- libio: handle opening a file when all files are closed (bug 31963)
- ldconfig: Ignore all GDB extension files
- ldconfig: Move endswithn into a new header file
- math: Update m68k ULPs
- stdlib: fix arc4random fallback to /dev/urandom (BZ 31612)
- elf: Make dl-rseq-symbols Linux only
2024-07-10 14:13:57 +02:00
Zbigniew Jędrzejewski-Szmek
2dfb5f35bd Make short-circuit builds work
The build would fail because the target already exists. Use "-f" to
make it work. This is useful because glibc takes a while to build ;)
2024-07-09 14:23:46 +02:00
Zbigniew Jędrzejewski-Szmek
6756999ced Move ldconfig to %{_sbindir}, adjust paths for merged-sbin
This implements https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin
and https://pagure.io/packaging-committee/pull-request/1355.
Since %{_sbindir} will point to /usr/bin, ldconfig is moved first
to /usr/sbin, but then when the merge is implemented, to /usr/bin.

Adjust the handling of zic and iconvconfig. Previously, they were
sorted into the right subpackage based on the location, but now all
files are in /usr/bin, so that doesn't work anymore.

Before the merge, /sbin/ldconfig and /usr/sbin/ldconfig point
to the same file, so both paths work. Virtual Provides:/sbin/ldconfig
allows other rpms to refer to either path. After sbin-merge,
the /usr/sbin/ symlink needs to be created by filesystem, so
add the appropriate Requires.
2024-07-09 14:22:00 +02:00
Arjun Shankar
3928831719 Auto-sync with upstream branch master
Upstream commit: 2b92982e2369d292560793bee8e730f695f48ff3

- nptl: fix potential merge of __rseq_* relro symbols
- riscv: Update nofpu libm test ulps
- manual: Recommendations for dynamic linker hardening
- socket: Add new test for shutdown
- elf/rtld: Fix auxiliary vector for enable_secure
- hppa/vdso: Provide 64-bit clock_gettime() vDSO only
- debug: Fix clang open fortify wrapper (BZ 31927)
- Add --disable-static-c++-tests option [BZ #31797]
- Add --disable-static-c++-link-check option [BZ #31412]
- Update mmap() flags and errors lists
- MIPSr6/math: Use builtin fma and fmaf
- elf: Support recursive use of dynamic TLS in interposed malloc
- Fix conditionals on mtrace-based tests (bug 31892)
- signal/Makefile: Split and sort tests
- x86: Set default non_temporal_threshold for Zhaoxin processors
- x86_64: Optimize large size copy in memmove-ssse3
- x86: Set preferred CPU features on the KH-40000 and KX-7000 Zhaoxin processors
- Aarch64: Add new memset for Qualcomm's oryon-1 core
- Aarch64: Add memcpy for qualcomm's oryon-1 core
- debug: Fix clang open fortify wrapper (BZ 31927)
- debug: Fix clang mq_open fortify wrapper (BZ 31917)
- tests-mbwc: Silence gcc 14 -Werror=format-overflow=
2024-07-04 13:16:14 +02:00
Patsy Griffin
1603139976 Move ANSI_X3.110-1983 support from main package to glibc-gconv-extra. 2024-07-01 14:37:11 -04:00
Patsy Griffin
d1acdb1a5e Auto-sync with upstream branch master
Upstream commit: 21738846a19eb4a36981efd37d9ee7cb6d687494

- time: Avoid memcmp overread in tzset (bug 31931)
- Fix strnlen doc re array size
- arm: Avoid UB in elf_machine_rel()
- LoongArch: Fix tst-gnu2-tls2 test case
- posix: Fix pidfd_spawn/pidfd_spawnp leak if execve fails (BZ 31695)
- INSTALL: regenerate
- Revert "MIPSr6/math: Use builtin fma and fmaf"
- INSTALL: Fix typo ibmlondouble to ibmlongdouble
- RISC-V: Execute a PAUSE hint in spin loops
- MIPSr6/math: Use builtin fma and fmaf
- po: incorporate translations (cs, de, hr, ko, pl, ro, ru, sv, uk, zh_CN)
- mtrace: make shell commands robust against meta characters
- hppa/vdso: Add wrappers for vDSO functions
- Update hppa libm-test-ulps
- Benchtests: Remove broken walk benchmarks
- Update hppa libm-test-ulps
- RISC-V: Update ulps
- MIPS: Update ulps
2024-06-27 10:52:45 -04:00
Florian Weimer
b5cf50002f Auto-sync with upstream branch master
Upstream commit: dd144dce21c864781fade4561581d50fb4549956

- malloc: Replace shell/Perl gate in mtrace
- s390x: Capture grep output in static PIE check
- i386: Update ulps
- malloc: Always install mtrace (bug 31892)
- Translations: Regenerate libc.pot
- s390x: Regenerate ULPs.
- LoongArch: Fix _dl_tlsdesc_dynamic in LSX case
- aarch64: Update ulps
- powerpc: Update ulps
- Linux: Include <dl-symbol-redir-ifunc.h> in dl-sysdep.c
- linux: add definitions for hugetlb page size encodings
- elf: Remove HWCAP_IMPORTANT
- elf: Remove LD_HWCAP_MASK / tunable glibc.cpu.hwcap_mask
- elf: Remove _DL_PLATFORMS_COUNT
- elf: Remove _DL_FIRST_PLATFORM
- elf: Remove _DL_HWCAP_PLATFORM
- elf: Remove platform strings in dl-procinfo.c
- elf: Remove _dl_string_platform
- elf: Remove loading legacy hwcaps/platform entries in dynamic loader
- x86: Remove HWCAP_START and HWCAP_COUNT
- math: Update mips32/mips64 ulps for log2p1
- Convert to autoconf 2.72 (vanilla release, no distribution patches)
- Implement C23 exp2m1, exp10m1
- Implement C23 log10p1
- Implement C23 logp1
- support: Include <limits.h> for NAME_MAX use in temp_file.c
- support: Include <stdlib.h> for atoi use in support_wait_for_thread_exit
- Extend tst-getconf.sh test with NPROCESSORS_CONF and NPROCESSORS_ONLN
- Define ISO 639-3 "ltg" (Latgalian) and add ltg_LV locale
- Minor code improvement to timespec_subtract example
- Modernize and fix doc’s “Date and Time” (BZ 31876)
- manual: minor language fix (bz 31340)
- x86: Fix value for `x86_memset_non_temporal_threshold` when it is undesirable
- elf: Change module-names to modules-names in comments
- resolv: Track single-request fallback via _res._flags (bug 31476)
- x86: Properly set x86 minimum ISA level [BZ #31883]
- tunables: sort tunables list (BZ 30027)
- linux: Remove __stack_prot
2024-06-21 13:25:26 +02:00
DJ Delorie
e8ab643b0a Auto-sync with upstream branch master
Upstream commit: e7ac92e6ca9784b397189df0b2e1fb34f425bab8

- <stdio.h>: Acknowledge that getdelim/getline are in POSIX
- localedata: Lowercase day and abday in cs_CZ
- x86: Properly set MINIMUM_X86_ISA_LEVEL for i386 [BZ #31867]
- x86: Enable non-temporal memset tunable for AMD
- hurd: Fix getxattr/listxattr returning ERANGE
- hurd: Fix setxattr return value on replacing
- hurd: Fix getxattr("gnu.translator") returning ENODATA
- hurd: Fix lsetxattr return value
- localedata: add new locales scn_IT
- support: Fix typo in xgetsockname error message
- getconf: Add NPROCESSORS_{CONF,ONLN} [BZ #31661]
- Linux: Add epoll ioctls
- Improve doc for time_t range (BZ 31808)
- difftime can throw exceptions
- malloc: New test to check malloc alternate path using memory obstruction
- math: Fix exp10 undefined left shift
- libio: Test for fdopen memory leak without SEEK_END support (bug 31840)
- Remove memory leak in fdopen (bug 31840)
- Add new AArch64 HWCAP2 definitions from Linux 6.9 to bits/hwcap.h
- Add more NT_ARM_* constants from Linux kernel to elf.h
- stdlib: Describe __cxa_finalize usage in function comment
- elf: Avoid some free (NULL) calls in _dl_update_slotinfo
- x86: Add seperate non-temporal tunable for memset
- x86: Improve large memset perf with non-temporal stores [RHEL-29312]
- elf: add note identifier for dlopen metadata
- elf: update NT_FDO_PACKAGING_METADATA spec URL
2024-06-12 18:11:36 -04:00
Arjun Shankar
98d57c7f87 Auto-sync with upstream branch master
Upstream commit: 0c1d2c277a59f08fd3232b33d18644ea890190ea

- LoongArch: Use "$fcsr0" instead of "$r0" in _FPU_{GET,SET}CW
- x86_64: Reformat elf_machine_rela
- i386: Disable Intel Xeon Phi tests for GCC 15 and above (BZ 31782)
- difftime is pure, not const
- parse_fdinfo: Don't advance pointer twice [BZ #31798]
- elf/Makefile: Split and sort PIE tests
- Revert "Test fscanf of long double without <stdio.h>"
- sysdeps/ieee754/ldbl-opt/Makefile: Split and sort libnldbl-calls
- Test fscanf of long double without <stdio.h>
- sysdeps/ieee754/ldbl-opt/Makefile: Remove test-nldbl-redirect-static
- sysdeps/ieee754/ldbl-opt/Makefile: Split and sort tests
- s390x: Regenerate ULPs.
- powerpc: Remove duplicated versionsort from libm.a (BZ 31789)
- Update kernel version to 6.9 in header constant tests
- localedata: cv_RU: update translation
2024-05-29 11:05:41 +02:00
Patsy Griffin
e32c8ab95e Auto-sync with upstream branch master
Upstream commit: eaa8113bf0eb599025e3efdbe1bb214ee8dc645a

- math: Provide missing math symbols on libc.a (BZ 31781)
- s390: Make utmp32, utmpx32, and login32 shared only (BZ 31790)
- microblaze: Remove cacheflush from libc.a (BZ 31788)
- powerpc: Remove duplicated llrintf and llrintf32 from libm.a (BZ 31787)
- powerpc: Remove duplicate strchrnul and strncasecmp_l libc.a (BZ 31786)
- loongarch: Remove duplicate strnlen in libc.a (BZ 31785)
- aarch64: Remove duplicate memchr/strlen in libc.a (BZ 31777)
- Update PIDFD_* constants for Linux 6.9
- Define write_profiling functions only in profile library [BZ #31756]
- Don't provide XXXf128_do_not_use aliases [BZ #31757]
- Don't provide scalb/significand _FloatN aliases [BZ #31760]
- math: Fix isnanf128 static build (BZ 31774)
- math: Add support for auto static math tests
- Change _IO_stderr_/_IO_stdin_/_IO_stdout to compat symbols [BZ #31766]
- Obsolete _dl_mcount_wrapper in glibc 2.40 [BZ #31765]
- math: Fix i386 and m68k exp10 on static build (BZ 31775)
- math: Fix i386 and m68k fmod/fmodf on static build (BZ 31488)
- Remove the clone3 symbol from libc.a [BZ #31770]
- aarch64/fpu: Add vector variants of pow
- Compile libmvec with -fno-math-errno
- manual: clarify defintions of floating point exponent bounds (bug 31518)
- LoongArch: Update ulps
- LoongArch: Fix tst-gnu2-tls2 compiler error
- resolv: Make _res_opcodes a compat symbol [BZ #31764]
- i386: Don't define stpncpy alias when used in IFUNC [BZ #31768]
- powerpc: Update ulps
- arm: Update ulps
- aarch64: Update ulps
- math: Add more details to the test driver output.
- Implement C23 log2p1
- Update syscall lists for Linux 6.9
- Rename procutils_read_file to __libc_procutils_read_file [BZ #31755]
- nearbyint: Don't define alias when used in IFUNC [BZ #31759]
- Pass -nostdlib -nostartfiles together with -r [BZ #31753]
2024-05-23 08:57:35 -04:00
Florian Weimer
add3da24f0 Use release instead of baserelease for glibc32 conflict
This is necessary because %{baserelease} < %{release}, so the
previous Obsoletes: clause did not match an installed glibc32
package from the same build.
2024-05-22 11:26:11 +02:00
Florian Weimer
cb26947f73 Add Conflicts:/Obsoletes: for glibc32 to glibc.i686 2024-05-19 18:33:38 +02:00
Florian Weimer
1f7783d16b Auto-sync with upstream branch master
Upstream commit: 8d7b6b4cb27d4dec1dd5f7960298c1699275f962

- socket: Use may_alias on sockaddr structs (bug 19622)
- Use a doubly-linked list for _IO_list_all (bug 27777)
- powerpc64: Fix by using the configure value $libc_cv_cc_submachine [BZ #31629]
- aarch64/fpu: Add vector variants of cbrt
- aarch64/fpu: Add vector variants of hypot
- Use Linux 6.9 in build-many-glibcs.py
- localedata: Fix several issues with the set of characters considered 0-width [BZ #31370]
- math: Add GLIBC_TEST_LIBM_VERBOSE environment variable support.
- malloc: Improve aligned_alloc and calloc test coverage.
- Unify output from backtrace_symbols_fd with backtrace_symbols (bug 31730)
- manual: add dup3
- Force DT_RPATH for --enable-hardcoded-path-in-tests
- powerpc: Fix __fesetround_inline_nocheck on POWER9+ (BZ 31682)
- localedata: add mdf_RU locale
- elf: Make glibc.rtld.enable_secure ignore alias environment variables
- elf: Remove glibc.rtld.enable_secure check from parse_tunables_string
- elf: Only process multiple tunable once (BZ 31686)
2024-05-19 11:58:16 +02:00
Arjun Shankar
e9d072eb64 Move memory tracing libs to appropriate sub-packages
Commit 2d5af83031 moved libc_malloc_debug.so.0 to glibc-utils, but
this made it impossible to install the 32-bit version of the library on
x86_64.

libmemusage.so is a similar tracing library that is currently shipped in
glibc but should also (with the exception of i686) be moved to
glibc-utils.

This commit fixes that by:

1. Moving libc_malloc_debug.so.0 back to glibc on i686.

2. Moving libmemusage.so to glibc-utils, again, except on i686.
2024-05-15 13:49:14 +02:00
Arjun Shankar
2d5af83031 Move libc_malloc_debug.so.0 from glibc to glibc-utils
libc_malloc_debug is a debugging library and therefore should not be
installed by default.  Since it is needed in order to enable mtrace
functionality, it belongs in glibc-utils along with the mtrace log
interpreter.
2024-05-14 12:41:50 +02:00
DJ Delorie
05c725ac55 Auto-sync with upstream master
Upstream commit: 5f245f3bfbe61b2182964dafb94907e38284b806.

- Add crt1-2.0.o for glibc 2.0 compatibility tests
- powerpc: Optimized strncmp for power10
- build-many-glibcs.py: Add openrisc hard float glibc variant
- or1k: Add hard float support
- or1k: Add hard float libm-test-ulps
- nscd: Use time_t for return type of addgetnetgrentX
- Add a test to check for duplicate definitions in the static library
- i686: Fix multiple definitions of __memmove_chk and __memset_chk
- i586: Fix multiple definitions of __memcpy_chk and __mempcpy_chk
- nscd: Typo inside comment in netgroup cache
2024-05-06 15:19:12 -04:00
Carlos O'Donell
79a3dc68ab Auto-sync with upstream master
Upstream commit: 91695ee4598b39d181ab8df579b888a8863c4cab

- Update License tag to match upstream.

- time: Allow later version licensing.
- hurd: Stop mapping AT_NO_AUTOMOUNT to O_NOTRANS
- libio: Sort test variables in Makefile
- AArch64: Remove unused defines of CPU names
- Make sure INSTALL is ASCII plaintext again
- x86: In ld.so, diagnose missing APX support in APX-only builds
- elf: Also compile dl-misc.os with $(rtld-early-cflags)
- CVE-2024-33601, CVE-2024-33602: nscd: netgroup: Use two buffers in addgetnetgrentX (bug 31680)
- CVE-2024-33600: nscd: Avoid null pointer crashes after notfound response (bug 31678)
- CVE-2024-33600: nscd: Do not send missing not-found response in addgetnetgrentX (bug 31678)
- CVE-2024-33599: nscd: Stack-based buffer overflow in netgroup cache (bug 31677)
- i386: ulp update for SSE2 --disable-multi-arch configurations
2024-05-01 12:48:47 -04:00
Martin Coufal
4720899564 CI Tests: disable Regression/bz863384-getaddrinfo-fails-to-return-FQDN-for-AF_INET-and-AF_INET6 on rhel10
* package perl-Net-DNS-Nameserver removed from rhel-10, test needs to be
  rewritten, disable for rhel10 until then
2024-04-26 13:11:40 +00:00
Florian Weimer
207f40b766 Enable CPU compatibility diagnostics in ld.so (RHEL-31738) 2024-04-25 17:31:37 +02:00
Florian Weimer
d6a43c7f0a Auto-sync with upstream branch master
Upstream commit: 41903cb6f460d62ba6dd2f4883116e2a624ee6f8

- GLIBC-SA-2024-0004: add commit for 2.31 branch
- benchtests: Add difficult strstr needle for bruteforce algorithms
- x86: Define MINIMUM_X86_ISA_LEVEL in config.h [BZ #31676]
- LoongArch: Add glibc.cpu.hwcap support.
- nptl: Fix tst-cancel30 on kernels without ppoll_time64 support
2024-04-25 11:07:33 +02:00
Arjun Shankar
6b7878d77d Auto-sync with upstream branch master
Upstream commit: 16c8dfba14ff7596ad3aea941a240f8abcdc50e6

- Drop glibc-rh827510.patch, fixed differently upstream.

- Revert "Allow glibc to be compiled without EXEC_PAGESIZE"
- locale: Handle loading a missing locale twice (Bug 14247)
- elf: Do not check for loader mmap on tst-decorate-maps (BZ 31553)
- Use --enable-obsolete in build-many-glibcs.py for nios2-linux-gnu
- login: Use unsigned 32-bit types for seconds-since-epoch
- login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701)
- login: Check default sizes of structs utmp, utmpx, lastlog
- benchtests: Add random() benchmark
- advisories: Add Reported-By
- Fix 'Reported-By' to use Camel Case for commit 6a98f4640ea453f
- Document CVE-2024-2961
- iconv: ISO-2022-CN-EXT: fix out-of-bound writes when writing escape sequence (CVE-2024-2961)
- elf/rtld: Count skipped environment variables for enable_secure
2024-04-23 11:18:01 +02:00
Florian Weimer
5a7908398e Update changelog 2024-04-22 11:50:05 +02:00
Tulio Magno Quites Machado Filho
09d1856f52 Enable power10 multilib
Co-authored-by: Florian Weimer <fweimer@redhat.com>
2024-04-14 17:11:20 +02:00
Tulio Magno Quites Machado Filho
34d1409178 Move the removal of multilibs to %pre 2024-04-14 17:11:20 +02:00
Florian Weimer
7749ea58a9 Hard-code ld.so paths for all architectures
This supports multiple ld.so files in a cleaner way.  Also
forward-port multiple libc.so.6 file handling in
wrap-find-debuginfo.sh from downstream.  This also incorporates
the “nm --format=posix“ change from #2115831 downstream.

Co-authored-by: Tulio Magno Quites Machado Filho <tuliom@redhat.com>
2024-04-14 17:11:20 +02:00
Florian Weimer
0d17d18a88 Remove remnants of 32-bit Arm support 2024-04-14 17:11:20 +02:00
Florian Weimer
114492e2a8 Rewrite flags inheritance in Lua
And simplify the invocation of the build shell function.
2024-04-14 17:11:20 +02:00
Florian Weimer
7a3e1914e0 Auto-sync with upstream branch master
Upstream commit: 14e56bd4ce15ac2d1cc43f762eb2e6b83fec1afe

- powerpc: Fix ld.so address determination for PCREL mode (bug 31640)
- Revert "x86_64: Suppress false positive valgrind error"
- wcsmbs: Ensure wcstr worst-case linear execution time (BZ 23865)
- wcsmbs: Add test-wcsstr
- posix: Sync tempname with gnulib
- socket: Add new test for connect
- libsupport: Add xgetpeername
2024-04-14 17:09:50 +02:00
Patsy Griffin
b2452ec760 Auto-sync with upstream branch master
Upstream commit: 42e48e720c78ab75eb8def9e866da52b0ac278df

- nptl: Add tst-pthread-key1-static for BZ #21777
- elf: Add ld.so test with non-existing program name
- elf: Check objname before calling fatal_error
- Use crtbeginT.o and crtend.o for non-PIE static executables
- aarch64: Enhanced CPU diagnostics for ld.so
- x86: Add generic CPUID data dumper to ld.so --list-diagnostics
- elf: Add CPU iteration support for future use in ld.so diagnostics
- timezone: sync to TZDB 2024a
- Fix bsearch, qsort doc to match POSIX better
- x86-64: Exclude FMA4 IFUNC functions for -mapxf
- Reinstate generic features-time64.h
- Cleanup __tls_get_addr on alpha/microblaze localplt.data
- arm: Remove ld.so __tls_get_addr plt usage
- aarch64: Remove ld.so __tls_get_addr plt usage
- math: x86 trunc traps when FE_INEXACT is enabled (BZ 31603)
- math: x86 floor traps when FE_INEXACT is enabled (BZ 31601)
- math: x86 ceill traps when FE_INEXACT is enabled (BZ 31600)
- aarch64/fpu: Add vector variants of erfc
- aarch64/fpu: Add vector variants of tanh
- aarch64/fpu: Add vector variants of sinh
- aarch64/fpu: Add vector variants of atanh
- aarch64/fpu: Add vector variants of asinh
- aarch64/fpu: Add vector variants of acosh
- aarch64/fpu: Add vector variants of cosh
- aarch64/fpu: Add vector variants of erf
- misc: Add support for Linux uio.h RWF_NOAPPEND flag
- manual: significand() uses FLT_RADIX, not 2
- manual: Clarify return value of cbrt(3)
- manual: floor(log2(fabs(x))) has rounding errors
- manual: logb(x) is floor(log2(fabs(x)))
- powerpc: Add missing arch flags on rounding ifunc variants
- math: Reformat Makefile.
- Always define __USE_TIME_BITS64 when 64 bit time_t is used
- benchtests: Improve benchtests for strstr
- x86_64: Remove avx512 strstr implementation
- signal: Avoid system signal disposition to interfere with tests
2024-04-09 18:02:09 -04:00
Martin Coufal
86c3f272ad CI Tests: make Regression/ESTALE-error-message-translation-regression-from-RHEL7 rhel-10 compatible 2024-03-28 16:28:21 +01:00
DJ Delorie
b2dcb43f05 Auto-sync with upstream branch master
Upstream commit: 96d1b9ac2321b565f340ba8f3674597141e3450d

- RISC-V: Fix the static-PIE non-relocated object check
- htl: Implement some support for TLS_DTV_AT_TP
- htl: Respect GL(dl_stack_flags) when allocating stacks
- hurd: Use the RETURN_ADDRESS macro
- hurd: Disable Prefer_MAP_32BIT_EXEC on non-x86_64 for now
- Allow glibc to be compiled without EXEC_PAGESIZE
- hurd: Stop relying on VM_MAX_ADDRESS
- hurd: Move internal functions to internal header
- stdlib: Fix tst-makecontext2 log when swapcontext fails
- or1k: Add prctl wrapper to unwrap variadic args
- or1k: Only define fpu rouding and exceptions with hard-float
- or1k: Update libm test ulps
- AArch64: Check kernel version for SVE ifuncs
2024-03-26 13:51:42 -04:00
Florian Weimer
b102601d3e Auto-sync with upstream branch master
Upstream commit: 1ea051145612f199d8716ecdf78b084b00b5a727

- Drop glibc-rh2269799.patch, fixed differently upstream.

-powerpc: Placeholder and infrastructure/build support to add Power11 related changes.
- powerpc: Add HWCAP3/HWCAP4 data to TCB for Power Architecture.
- elf: Enable TLS descriptor tests on aarch64
- arm: Update _dl_tlsdesc_dynamic to preserve caller-saved registers (BZ 31372)
- Ignore undefined symbols for -mtls-dialect=gnu2
- Add tst-gnu2-tls2mod1 to test-internal-extras
- x86-64: Allocate state buffer space for RDI, RSI and RBX (#2269799)
- riscv: Update nofpu libm test ulps
- Add STATX_MNT_ID_UNIQUE from Linux 6.8 to bits/statx-generic.h
- linux: Use rseq area unconditionally in sched_getcpu (bug 31479)
- aarch64: fix check for SVE support in assembler
- Update kernel version to 6.8 in header constant tests
- Update syscall lists for Linux 6.8
- Use Linux 6.8 in build-many-glibcs.py
- powerpc: Remove power8 strcasestr optimization
- riscv: Fix alignment-ignorant memcpy implementation
- linux/sigsetops: fix type confusion (bug 31468)
- LoongArch: Correct {__ieee754, _}_scalb -> {__ieee754, _}_scalbf
- duplocale: protect use of global locale (bug 23970)
2024-03-20 09:35:34 +01:00
Florian Weimer
136bbceed9 Global dynamic TLS access may clobber RBX (#2269799) 2024-03-16 15:38:14 +01:00
Florian Weimer
01911dc70e Do not generate ELF dependency information for glibc32 2024-03-15 09:07:24 +01:00
Joseph Myers
e025effd84 Build glibc32 binary package from glibc sources as part of x86_64 build
GCC for x86_64 includes 32-bit multilib support, requiring a 32-bit
glibc to be present when GCC is built.  That 32-bit glibc cannot come
from an i686 RPM because of limitations in Koji, so there is a hack
including a glibc32 "source" package that actually contains binaries
from an i686 build (and thus needs additional manual update steps).

Set up glibc.spec to build a glibc32 binary package directly when
building for x86_64, so avoiding the need for the separate glibc32
source package.  This improvement is tracked in
<https://fedoraproject.org/wiki/Changes/glibc32_Build_Adjustments> and
<https://bugzilla.redhat.com/show_bug.cgi?id=1598524>.

The list of files in the glibc32 package has been compared to that in
the previous package (the gnu/lib-names-32.h header is added, as its
previous omission appears to be a bug).  And the lists of files in the
other packages built from glibc.spec have also been compared before
and after this change, to make sure there aren't inappropriate changes
to those lists.
2024-03-14 15:40:51 +00:00
Sergey Kolosov
205275b675 CI Tests: makes tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7 compatible with RHEL 2024-03-12 18:32:23 +01:00
Sergey Kolosov
9d961552f7 CI Tests: tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in: disabled until the bug will be fixed 2024-03-06 14:57:01 +01:00
Sergey Kolosov
60e20f67b6 CI Tests: tests/Regression/bz1661513-glibc-Adjust-to-rpms-find-debuginfo-sh-changes-to-keep-stripping-binaries: set order to 1000 to avoid removing glibc-debuginfo package for other tests 2024-03-06 14:44:49 +01:00
Sergey Kolosov
4246727bc0 CI Tests: tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in: fixes libc.so.6 search path 2024-03-05 11:43:40 +01:00
Sergey Kolosov
51fcca6292 CI Tests: tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in: require glibc-debuginfo 2024-03-05 11:43:40 +01:00
Sergey Kolosov
c7aa4fc83f CI Tests: tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in: adjust test for future RHEL versions 2024-03-05 11:43:40 +01:00
Sergey Kolosov
fa5d2d58b2 CI Tests: updates zh_CN translation for tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7 2024-03-05 11:43:40 +01:00
Sergey Kolosov
71d41742d1 CI Tests: fix Fedora support for tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in 2024-03-05 11:43:40 +01:00
Sergey Kolosov
b07a1b7660 CI Tests: test coverage improvement 2024-03-05 11:43:40 +01:00
Patsy Griffin
a084b04ccf Auto-sync with upstream branch master
Upstream commit: b6e3898194bbae78910bbe9cd086937014961e45

- x86-64: Simplify minimum ISA check ifdef conditional with if
- manual/tunables - Add entry for enable_secure tunable.
- NEWS: Move enable_secure_tunable from 2.39 to 2.40.
- riscv: Add and use alignment-ignorant memcpy
- riscv: Add ifunc helper method to hwprobe.h
- riscv: Enable multi-arg ifunc resolvers
- riscv: Add __riscv_hwprobe pointer to ifunc calls
- riscv: Add hwprobe vdso call support
- linux: Introduce INTERNAL_VSYSCALL
- riscv: Add Linux hwprobe syscall support
- rtld: Add glibc.rtld.enable_secure tunable.
- x86-64: Update _dl_tlsdesc_dynamic to preserve AMX registers
- x86_64: Suppress false positive valgrind error
- x86: Don't check XFD against /proc/cpuinfo
- x86-64: Don't use SSE resolvers for ISA level 3 or above
- x86: Update _dl_tlsdesc_dynamic to preserve caller-saved registers
- sysdeps/unix/sysv/linux/x86_64/Makefile: Add the end marker
- cdefs: Drop access attribute for _FORTIFY_SOURCE=3 (BZ #31383)
- s390: Improve static-pie configure tests
- x86: Change ENQCMD test to CHECK_FEATURE_PRESENT
- debug: Improve mqueue.h fortify warnings with clang
- debug: Improve fcntl.h fortify warnings with clang
- wcsmbs: Improve fortify with clang
- syslog: Improve fortify with clang
- socket: Improve fortify with clang
- unistd: Improve fortify with clang
- stdlib: Improve fortify with clang
- string: Improve fortify with clang
- libio: Improve fortify with clang
- cdefs.h: Add clang fortify directives
- Update SHARED-FILES and license for Unicode 15.1.0.
- aarch64/fpu: Sync libmvec routines from 2.39 and before with AOR
- S390: Do not clobber r7 in clone [BZ #31402]
- x86_64: Exclude SSE, AVX and FMA4 variants in libm multiarch
- hurd: Reformat Makefile.
- htl/tests: Reformat Makefile.
- htl: Reformat Makefile.
- hesiod: Reformat Makefile.
- gmon: Reformat Makefile.
- dlfcn: Reformat Makefile.
- dirent: Reformat Makefile.
- ctype: Reformat Makefile.
- csu: Reformat Makefile.
- conform: Reformat Makefile.
- Support compiling .S files with additional options
- x86-64: Save APX registers in ld.so trampoline
- benchtests: Add more benchtests for rounding functions.
- tests: gracefully handle AppArmor userns containment
- treewide: python-scripts: use `is None` for none-equality
- powerpc: Remove power7 strstr optimization
- arm: Use _dl_find_object on __gnu_Unwind_Find_exidx (BZ 31405)
- math: Update mips64 ulps
2024-03-04 10:36:20 -05:00
Martin Coufal
51c6ed86e2 CI tests: fix Regression/bz1661513-glibc-Adjust-to-rpms-find-debuginfo-sh-changes-to-keep-stripping-binaries
Destination (name) of ld.so symlink can change and assert fails. Use
readlink to get proper filename to be checked.
2024-02-28 09:55:29 +01:00
Arjun Shankar
1061be84f7 Migrate License field to SPDX identifiers (#2222074)
This commit (a) expands on and corrects some errors in the long
comment describing various licenses used in glibc preceding the
License field; and (b) migrates the License field to SPDX identifiers
based on an analysis of glibc-2.39 sources done using the ScanCode
toolkit.

Licenses Allowed in Fedora:
https://docs.fedoraproject.org/en-US/legal/allowed-licenses

Adoption of SPDX in Fedora:
https://docs.fedoraproject.org/en-US/legal/update-existing-packages

Repository of Fedora License Data:
https://gitlab.com/fedora/legal/fedora-license-data

ScanCode toolkit:
https://github.com/nexB/scancode-toolkit
2024-02-27 18:56:04 +01:00
Arjun Shankar
dc38b4582d Correct a past changelog entry 2024-02-26 22:38:05 +01:00
DJ Delorie
f58422e787 Auto-sync with upstream branch master
Upstream commit: b881f1efcd1b30c2afab3599b41ce9cd4864c823

- elf: Add new LoongArch reloc types (110 to 126) into elf.h
- build-many-glibcs.py: Add s390 --disable-multi-arch / multi-arch configurations.
- sparc: Treat the version field in the FPU control word as reserved
- Implement setcontext/getcontext/makecontext/swapcontext for Hurd x86_64
- Use proc_getchildren_rusage when available in getrusage and times.
- Linux: Switch back to assembly syscall wrapper for prctl (bug 29770)
- i386: Use generic memrchr in libc (bug 31316)
2024-02-22 13:27:32 -05:00
Carlos O'Donell
f7655efa95 Auto-sync with upstream branch master
Upstream commit: ef7f4b1fef67430a8f3cfc77fa6aada2add851d7

- Apply the Makefile sorting fix
- sysdeps/x86_64/Makefile (tests): Add the end marker
- sort-makefile-lines.py: Allow '_' in name and "^# name"
- trivial doc fix: remove weird phrase "syscall takes zero to five arguments"
- mips: Use builtins for ffs and ffsll
- x86: Expand the comment on when REP STOSB is used on memset
- x86: Do not prefer ERMS for memset on Zen3+
- x86: Fix Zen3/Zen4 ERMS selection (BZ 30994)
- x86/cet: fix shadow stack test scripts
- test_printers_common.py: Remove invalid escape sequence
- elf: Remove attempt at env handling in elf/tst-rtld-list-diagnostics.py
- Add SOL_VSOCK from Linux 6.7 to bits/socket.h
- localedata: ssy_ER: Fix syntax error
- localedata: hr_HR: change currency to EUR/€
- Change lv_LV collation to agree with the recent change in CLDR
- Add new AArch64 HWCAP2 definitions from Linux 6.7 to bits/hwcap.h
- string: Add hidden builtin definition for __strcpy_chk.
- arm: Remove wrong ldr from _dl_start_user (BZ 31339)
- LoongArch: Use builtins for ffs and ffsll
- Remove sysdeps/ia64/math-use-builtins-ffs.h
- Fix stringop-overflow warning in tst-strlcat2.
- mips: FIx clone3 implementation (BZ 31325)
- stdlib: fix qsort example in manual
- soft-fp: Add brain format support
- Rename c2x / gnu2x tests to c23 / gnu23
- manual: Fix up stdbit.texi
- string: Use builtins for ffs and ffsll
- misc: tst-poll: Proper synchronize with child before sending the signal
- math: Remove bogus math implementations
- Refer to C23 in place of C2X in glibc
- elf: Remove _dl_sysdep_open_object hook function
- build-many-glibcs: relax version check to allow non-digit characters
- Use gcc __builtin_stdc_* builtins in stdbit.h if possible
- Open master branch for glibc 2.40 development
2024-02-15 18:30:01 -05:00
Florian Weimer
797647f2a8 Ignore symbolic links to . in sysroot construction 2024-02-07 09:24:40 +01:00
Carlos O'Donell
385a689f17 Switch to upstream 2.39 release
Upstream commit: ef321e23c20eebc6d6fb4044425c00e6df27b05f

- Document CVE-2023-6246, CVE-2023-6779, and CVE-2023-6780
- Update advisory format and introduce some automation
- manual/io: Fix swapped reading and writing phrase.
- Fix typo
- S390: Fix building with --disable-mutli-arch [BZ #31196]
- NEWS: insert advisories and fixed bugs for 2.39
- contrib.texi: update
- INSTALL, install.texi: minor updates, regenerate
- libc.pot: regenerate
- version.h, include/features.h: Bump version to 2.39
- Create ChangeLog.old/ChangeLog.28
2024-02-06 17:46:04 -05:00
Martin Coufal
7ce2803ac6 CI Test: fix /tests/Regression/bz488748-inet6-opt-init-sets-incorrect-header-len
* add '-D_GNU_SOURCE' to compilation as 'inet6_opt_init' is a GNU
  extension
2024-02-02 14:30:22 +00:00
Martin Coufal
ea742f068a CI Tests: fix /tests/Standardscompliance/bz531160-ldd-Vulnerable-to-Social-Engineering-Exploits
* include 'unistd.h'
2024-02-02 14:30:22 +00:00
Martin Coufal
cace4f829d CI Tests: fix /tests/Sanity/basic-linking-sanity
* use 'fclose'
* add missing includes
2024-02-02 14:30:22 +00:00
Martin Coufal
82e9f5dfc6 CI Tests: fix /tests/Regression/double_free_exploit
* add missing casts to int
* add missing includes
2024-02-02 14:30:22 +00:00
Martin Coufal
9b8bc360e1 CI Tests: fix /tests/Regression/bz827362-RHEL6-2-ftell-after-fseek-moves-the-offset-on-a
* include 'wchar.h'
2024-02-02 14:30:22 +00:00
Martin Coufal
306c1b65fa CI Tests: fix /tests/Regression/bz600457-locally-defined-symbol-resolving-failure
* add includes
2024-02-02 14:30:22 +00:00
Martin Coufal
9ba57dfb0e CI Tests: fix /tests/Regression/bz549813-dl-close-race-with-C-destructor
* include 'unistd.h'
2024-02-02 14:30:22 +00:00
Martin Coufal
ec13b9b33e CI Tests: fix /tests/Regression/bz529997-sem_timedwait-with-invalid-time
* include 'unistd.h'
2024-02-02 14:30:22 +00:00
Martin Coufal
d1b1cc9c26 CI Tests: fix Regression/bz455360-RHEL4-vfprintf-call-goes-into-recursive
* add 'gcc' to required packages
* include 'unistd.h'
2024-02-02 14:30:22 +00:00
Martin Coufal
3eb443a2d1 CI Tests: fix Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value
* add gcc to required packages
* include 'unistd.h'
2024-02-02 14:30:22 +00:00
Martin Coufal
1b6496d171 CI Tests: add Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports
test
2024-02-02 14:30:22 +00:00
Martin Coufal
53a0744ff2 CI Tests: add
Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc test
2024-02-02 14:30:22 +00:00
89 changed files with 3206 additions and 726 deletions

211
glibc-nolink-libc.patch Normal file
View File

@ -0,0 +1,211 @@
commit 624acf596c5074ffc63ff697850cad4c8ef2e7ff
Author: Florian Weimer <fweimer@redhat.com>
Date: Tue Nov 12 20:09:33 2024 +0100
elf: Second ld.so relocation only if libc.so has been loaded
Commit 8f8dd904c4a2207699bb666f30acceb5209c8d3f (“elf:
rtld_multiple_ref is always true”) removed some code that happened
to enable compatibility with programs that do not link against
libc.so. Such programs cannot call dlopen or any dynamic linker
functions (except __tls_get_addr), so this is not really useful.
Still ld.so should not crash with a null-pointer dereference
or undefined symbol reference in these cases.
Perform the final relocation for ld.so right before relocating
libc.so (which seems more correct anyway), but only if libc.so
has been loaded. In the main relocation loop, call
_dl_relocate_object unconditionally because it already checks
if the object has been relocated. Only call __rtld_mutex_init
and __rtld_malloc_init_real if libc.so has been loaded. Otherwise,
the full implementations are not available.
The previous concern regarding GOT updates through self-relocation
no longer applies because function pointers are updated
explicitly through __rtld_mutex_init and __rtld_malloc_init_real,
and not through relocation.
Fixes commit 8f8dd904c4a2207699bb666f30acceb5209c8d3f (“elf:
rtld_multiple_ref is always true”).
diff --git a/elf/Makefile b/elf/Makefile
index 3a1cb72955dc0eec..b044a2c2fa974905 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -3169,3 +3169,20 @@ tst-rtld-no-malloc-audit-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so
# Any shared object should do.
tst-rtld-no-malloc-preload-ENV = LD_PRELOAD=$(objpfx)tst-auditmod1.so
+
+# These rules link and run the special elf/tst-nolink-libc-* tests if
+# a port adds them to the tests variables. Neither test variant is
+# linked against libc.so, but tst-nolink-libc-1 is linked against
+# ld.so. The test is always run directly, not under the dynamic
+# linker.
+CFLAGS-tst-nolink-libc.c += $(no-stack-protector)
+$(objpfx)tst-nolink-libc-1: $(objpfx)tst-nolink-libc.o $(objpfx)ld.so
+ $(LINK.o) -nostdlib -nostartfiles -o $@ $< \
+ -Wl,--dynamic-linker=$(objpfx)ld.so,--no-as-needed $(objpfx)ld.so
+$(objpfx)tst-nolink-libc-1.out: $(objpfx)tst-nolink-libc-1 $(objpfx)ld.so
+ $< > $@ 2>&1; $(evaluate-test)
+$(objpfx)tst-nolink-libc-2: $(objpfx)tst-nolink-libc.o
+ $(LINK.o) -nostdlib -nostartfiles -o $@ $< \
+ -Wl,--dynamic-linker=$(objpfx)ld.so
+$(objpfx)tst-nolink-libc-2.out: $(objpfx)tst-nolink-libc-2 $(objpfx)ld.so
+ $< > $@ 2>&1; $(evaluate-test)
diff --git a/elf/rtld.c b/elf/rtld.c
index b8cc3f605f9e053c..f54b1829af20881a 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -2243,15 +2243,7 @@ dl_main (const ElfW(Phdr) *phdr,
_rtld_main_check (main_map, _dl_argv[0]);
- /* Now we have all the objects loaded. Relocate them all except for
- the dynamic linker itself. We do this in reverse order so that copy
- relocs of earlier objects overwrite the data written by later
- objects. We do not re-relocate the dynamic linker itself in this
- loop because that could result in the GOT entries for functions we
- call being changed, and that would break us. It is safe to relocate
- the dynamic linker out of order because it has no copy relocations.
- Likewise for libc, which is relocated early to ensure that IFUNC
- resolvers in libc work. */
+ /* Now we have all the objects loaded. */
int consider_profiling = GLRO(dl_profile) != NULL;
@@ -2259,9 +2251,19 @@ dl_main (const ElfW(Phdr) *phdr,
GLRO(dl_lazy) |= consider_profiling;
if (GL(dl_ns)[LM_ID_BASE].libc_map != NULL)
- _dl_relocate_object (GL(dl_ns)[LM_ID_BASE].libc_map,
- GL(dl_ns)[LM_ID_BASE].libc_map->l_scope,
- GLRO(dl_lazy) ? RTLD_LAZY : 0, consider_profiling);
+ {
+ /* If libc.so has been loaded, relocate it early, after the
+ dynamic loader itself. */
+ RTLD_TIMING_VAR (start);
+ rtld_timer_start (&start);
+
+ _dl_relocate_object_no_relro (&GL(dl_rtld_map), main_map->l_scope, 0, 0);
+ _dl_relocate_object (GL(dl_ns)[LM_ID_BASE].libc_map,
+ GL(dl_ns)[LM_ID_BASE].libc_map->l_scope,
+ GLRO(dl_lazy) ? RTLD_LAZY : 0, consider_profiling);
+
+ rtld_timer_accum (&relocate_time, start);
+ }
RTLD_TIMING_VAR (start);
rtld_timer_start (&start);
@@ -2284,9 +2286,8 @@ dl_main (const ElfW(Phdr) *phdr,
/* Also allocated with the fake malloc(). */
l->l_free_initfini = 0;
- if (l != &GL(dl_rtld_map))
- _dl_relocate_object (l, l->l_scope, GLRO(dl_lazy) ? RTLD_LAZY : 0,
- consider_profiling);
+ _dl_relocate_object (l, l->l_scope, GLRO(dl_lazy) ? RTLD_LAZY : 0,
+ consider_profiling);
/* Add object to slot information data if necessasy. */
if (l->l_tls_blocksize != 0 && __rtld_tls_init_tp_called)
@@ -2324,27 +2325,18 @@ dl_main (const ElfW(Phdr) *phdr,
/* Set up the object lookup structures. */
_dl_find_object_init ();
- /* Likewise for the locking implementation. */
- __rtld_mutex_init ();
-
- /* Re-relocate ourselves with user-controlled symbol definitions. */
-
- {
- RTLD_TIMING_VAR (start);
- rtld_timer_start (&start);
-
- _dl_relocate_object_no_relro (&GL(dl_rtld_map), main_map->l_scope, 0, 0);
-
- /* The malloc implementation has been relocated, so resolving
- its symbols (and potentially calling IFUNC resolvers) is safe
- at this point. */
- __rtld_malloc_init_real (main_map);
-
- if (GL(dl_rtld_map).l_relro_size != 0)
- _dl_protect_relro (&GL(dl_rtld_map));
+ /* If libc.so was loaded, ld.so has been fully relocated along with
+ it. Complete ld.so initialization with mutex symbols from
+ libc.so and malloc symbols from the global scope. */
+ if (GL(dl_ns)[LM_ID_BASE].libc_map != NULL)
+ {
+ __rtld_mutex_init ();
+ __rtld_malloc_init_real (main_map);
+ }
- rtld_timer_accum (&relocate_time, start);
- }
+ /* All ld.so initialization is complete. Apply RELRO. */
+ if (GL(dl_rtld_map).l_relro_size != 0)
+ _dl_protect_relro (&GL(dl_rtld_map));
/* Relocation is complete. Perform early libc initialization. This
is the initial libc, even if audit modules have been loaded with
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 527c7a5ae898acea..a3f7fc4054f5d54d 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -652,7 +652,12 @@ install-bin += \
# install-bin
$(objpfx)pldd: $(objpfx)xmalloc.o
+
+test-internal-extras += tst-nolink-libc
+ifeq ($(run-built-tests),yes)
+tests-special += $(objpfx)tst-nolink-libc-1.out $(objpfx)tst-nolink-libc-2.out
endif
+endif # $(subdir) == elf
ifeq ($(subdir),rt)
CFLAGS-mq_send.c += -fexceptions
diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile
index a73c897f43c9a206..e73ce4f81114e789 100644
--- a/sysdeps/unix/sysv/linux/arm/Makefile
+++ b/sysdeps/unix/sysv/linux/arm/Makefile
@@ -1,5 +1,8 @@
ifeq ($(subdir),elf)
sysdep-rtld-routines += aeabi_read_tp libc-do-syscall
+# The test uses INTERNAL_SYSCALL_CALL. In thumb mode, this uses
+# an undefined reference to __libc_do_syscall.
+CFLAGS-tst-nolink-libc.c += -marm
endif
ifeq ($(subdir),misc)
diff --git a/sysdeps/unix/sysv/linux/tst-nolink-libc.c b/sysdeps/unix/sysv/linux/tst-nolink-libc.c
new file mode 100644
index 0000000000000000..817f37784b4080f9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/tst-nolink-libc.c
@@ -0,0 +1,25 @@
+/* Test program not linked against libc.so and not using any glibc functions.
+ Copyright (C) 2024 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 <sysdep.h>
+
+void
+_start (void)
+{
+ INTERNAL_SYSCALL_CALL (exit_group, 0);
+}

158
glibc-rh2327564-1.patch Normal file
View File

@ -0,0 +1,158 @@
commit d115e98ad627fae62679bc18e3bf062a898860cb
Author: Florian Weimer <fweimer@redhat.com>
Date: Wed Nov 20 19:21:45 2024 +0100
Revert "AArch64: Remove memset-reg.h"
This reverts commit 8ecb477ea16a387a44ace5bf59d39a7e270b238b.
diff --git a/sysdeps/aarch64/memset-reg.h b/sysdeps/aarch64/memset-reg.h
new file mode 100644
index 0000000000000000..6c7f60b37edf3b11
--- /dev/null
+++ b/sysdeps/aarch64/memset-reg.h
@@ -0,0 +1,30 @@
+/* Register aliases for memset to be used across implementations.
+ Copyright (C) 2017-2024 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/>. */
+
+#define dstin x0
+#define val x1
+#define valw w1
+#define count x2
+#define dst x3
+#define dstend x4
+#define tmp1 x5
+#define tmp1w w5
+#define tmp2 x6
+#define tmp2w w6
+#define zva_len x7
+#define zva_lenw w7
diff --git a/sysdeps/aarch64/memset.S b/sysdeps/aarch64/memset.S
index b76dde1557ed8fb1..caafb019e2b6217b 100644
--- a/sysdeps/aarch64/memset.S
+++ b/sysdeps/aarch64/memset.S
@@ -30,6 +30,7 @@
*/
#define dstin x0
+#define val x1
#define valw w1
#define count x2
#define dst x3
diff --git a/sysdeps/aarch64/multiarch/memset_a64fx.S b/sysdeps/aarch64/multiarch/memset_a64fx.S
index f665b5a891433c1c..2e6d882fc931a882 100644
--- a/sysdeps/aarch64/multiarch/memset_a64fx.S
+++ b/sysdeps/aarch64/multiarch/memset_a64fx.S
@@ -18,6 +18,7 @@
<https://www.gnu.org/licenses/>. */
#include <sysdep.h>
+#include <sysdeps/aarch64/memset-reg.h>
/* Assumptions:
*
@@ -35,14 +36,6 @@
.arch armv8.2-a+sve
-#define dstin x0
-#define valw w1
-#define count x2
-#define dst x3
-#define dstend x4
-#define tmp1 x5
-#define tmp2 x6
-
.macro st1b_unroll first=0, last=7
st1b z0.b, p0, [dst, \first, mul vl]
.if \last-\first
diff --git a/sysdeps/aarch64/multiarch/memset_emag.S b/sysdeps/aarch64/multiarch/memset_emag.S
index cf1b25f2edf64900..6d714ed0e1b396ef 100644
--- a/sysdeps/aarch64/multiarch/memset_emag.S
+++ b/sysdeps/aarch64/multiarch/memset_emag.S
@@ -18,6 +18,7 @@
<https://www.gnu.org/licenses/>. */
#include <sysdep.h>
+#include "memset-reg.h"
/* Assumptions:
*
@@ -25,13 +26,6 @@
*
*/
-#define dstin x0
-#define val x1
-#define valw w1
-#define count x2
-#define dst x3
-#define dstend x4
-
ENTRY (__memset_emag)
PTR_ARG (0)
diff --git a/sysdeps/aarch64/multiarch/memset_kunpeng.S b/sysdeps/aarch64/multiarch/memset_kunpeng.S
index f815c20b0383f057..7b215501376cbe03 100644
--- a/sysdeps/aarch64/multiarch/memset_kunpeng.S
+++ b/sysdeps/aarch64/multiarch/memset_kunpeng.S
@@ -18,6 +18,7 @@
<https://www.gnu.org/licenses/>. */
#include <sysdep.h>
+#include <sysdeps/aarch64/memset-reg.h>
/* Assumptions:
*
@@ -25,12 +26,6 @@
*
*/
-#define dstin x0
-#define valw w1
-#define count x2
-#define dst x3
-#define dstend x4
-
ENTRY (__memset_kunpeng)
PTR_ARG (0)
diff --git a/sysdeps/aarch64/multiarch/memset_oryon1.S b/sysdeps/aarch64/multiarch/memset_oryon1.S
index 6fa28a9bd030a705..b43a43b54e1b3439 100644
--- a/sysdeps/aarch64/multiarch/memset_oryon1.S
+++ b/sysdeps/aarch64/multiarch/memset_oryon1.S
@@ -19,18 +19,12 @@
<https://www.gnu.org/licenses/>. */
#include <sysdep.h>
+#include "memset-reg.h"
/* Assumptions:
ARMv8-a, AArch64, unaligned accesses
*/
-#define dstin x0
-#define val x1
-#define valw w1
-#define count x2
-#define dst x3
-#define dstend x4
-
ENTRY (__memset_oryon1)
PTR_ARG (0)

276
glibc-rh2327564-2.patch Normal file
View File

@ -0,0 +1,276 @@
commit b26c53ecc4dd3bc48b11e09f6ddc7c1441e126c2
Author: Florian Weimer <fweimer@redhat.com>
Date: Wed Nov 20 19:21:48 2024 +0100
Revert "AArch64: Optimize memset"
This reverts commit cec3aef32412779e207f825db0d057ebb4628ae8.
diff --git a/sysdeps/aarch64/memset.S b/sysdeps/aarch64/memset.S
index caafb019e2b6217b..7ef77ee8c926de21 100644
--- a/sysdeps/aarch64/memset.S
+++ b/sysdeps/aarch64/memset.S
@@ -1,5 +1,4 @@
-/* Generic optimized memset using SIMD.
- Copyright (C) 2012-2024 Free Software Foundation, Inc.
+/* Copyright (C) 2012-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -18,6 +17,7 @@
<https://www.gnu.org/licenses/>. */
#include <sysdep.h>
+#include "memset-reg.h"
#ifndef MEMSET
# define MEMSET memset
@@ -25,132 +25,130 @@
/* Assumptions:
*
- * ARMv8-a, AArch64, Advanced SIMD, unaligned accesses.
+ * ARMv8-a, AArch64, unaligned accesses
*
*/
-#define dstin x0
-#define val x1
-#define valw w1
-#define count x2
-#define dst x3
-#define dstend x4
-#define zva_val x5
-#define off x3
-#define dstend2 x5
-
ENTRY (MEMSET)
+
PTR_ARG (0)
SIZE_ARG (2)
dup v0.16B, valw
- cmp count, 16
- b.lo L(set_small)
-
add dstend, dstin, count
- cmp count, 64
- b.hs L(set_128)
- /* Set 16..63 bytes. */
- mov off, 16
- and off, off, count, lsr 1
- sub dstend2, dstend, off
- str q0, [dstin]
- str q0, [dstin, off]
- str q0, [dstend2, -16]
- str q0, [dstend, -16]
- ret
+ cmp count, 96
+ b.hi L(set_long)
+ cmp count, 16
+ b.hs L(set_medium)
+ mov val, v0.D[0]
- .p2align 4
/* Set 0..15 bytes. */
-L(set_small):
- add dstend, dstin, count
- cmp count, 4
- b.lo 2f
- lsr off, count, 3
- sub dstend2, dstend, off, lsl 2
- str s0, [dstin]
- str s0, [dstin, off, lsl 2]
- str s0, [dstend2, -4]
- str s0, [dstend, -4]
+ tbz count, 3, 1f
+ str val, [dstin]
+ str val, [dstend, -8]
+ ret
+ nop
+1: tbz count, 2, 2f
+ str valw, [dstin]
+ str valw, [dstend, -4]
ret
-
- /* Set 0..3 bytes. */
2: cbz count, 3f
- lsr off, count, 1
strb valw, [dstin]
- strb valw, [dstin, off]
- strb valw, [dstend, -1]
+ tbz count, 1, 3f
+ strh valw, [dstend, -2]
3: ret
+ /* Set 17..96 bytes. */
+L(set_medium):
+ str q0, [dstin]
+ tbnz count, 6, L(set96)
+ str q0, [dstend, -16]
+ tbz count, 5, 1f
+ str q0, [dstin, 16]
+ str q0, [dstend, -32]
+1: ret
+
.p2align 4
-L(set_128):
- bic dst, dstin, 15
- cmp count, 128
- b.hi L(set_long)
- stp q0, q0, [dstin]
+ /* Set 64..96 bytes. Write 64 bytes from the start and
+ 32 bytes from the end. */
+L(set96):
+ str q0, [dstin, 16]
stp q0, q0, [dstin, 32]
- stp q0, q0, [dstend, -64]
stp q0, q0, [dstend, -32]
ret
- .p2align 4
+ .p2align 3
+ nop
L(set_long):
+ and valw, valw, 255
+ bic dst, dstin, 15
str q0, [dstin]
- str q0, [dst, 16]
- tst valw, 255
- b.ne L(no_zva)
-#ifndef ZVA64_ONLY
- mrs zva_val, dczid_el0
- and zva_val, zva_val, 31
- cmp zva_val, 4 /* ZVA size is 64 bytes. */
- b.ne L(zva_128)
-#endif
- stp q0, q0, [dst, 32]
- bic dst, dstin, 63
- sub count, dstend, dst /* Count is now 64 too large. */
- sub count, count, 64 + 64 /* Adjust count and bias for loop. */
-
- /* Write last bytes before ZVA loop. */
- stp q0, q0, [dstend, -64]
- stp q0, q0, [dstend, -32]
-
- .p2align 4
-L(zva64_loop):
- add dst, dst, 64
- dc zva, dst
+ cmp count, 256
+ ccmp valw, 0, 0, cs
+ b.eq L(try_zva)
+L(no_zva):
+ sub count, dstend, dst /* Count is 16 too large. */
+ sub dst, dst, 16 /* Dst is biased by -32. */
+ sub count, count, 64 + 16 /* Adjust count and bias for loop. */
+1: stp q0, q0, [dst, 32]
+ stp q0, q0, [dst, 64]!
+L(tail64):
subs count, count, 64
- b.hi L(zva64_loop)
+ b.hi 1b
+2: stp q0, q0, [dstend, -64]
+ stp q0, q0, [dstend, -32]
ret
+L(try_zva):
+#ifndef ZVA64_ONLY
.p2align 3
-L(no_zva):
- sub count, dstend, dst /* Count is 32 too large. */
- sub count, count, 64 + 32 /* Adjust count and bias for loop. */
-L(no_zva_loop):
+ mrs tmp1, dczid_el0
+ tbnz tmp1w, 4, L(no_zva)
+ and tmp1w, tmp1w, 15
+ cmp tmp1w, 4 /* ZVA size is 64 bytes. */
+ b.ne L(zva_128)
+ nop
+#endif
+ /* Write the first and last 64 byte aligned block using stp rather
+ than using DC ZVA. This is faster on some cores.
+ */
+ .p2align 4
+L(zva_64):
+ str q0, [dst, 16]
stp q0, q0, [dst, 32]
+ bic dst, dst, 63
stp q0, q0, [dst, 64]
+ stp q0, q0, [dst, 96]
+ sub count, dstend, dst /* Count is now 128 too large. */
+ sub count, count, 128+64+64 /* Adjust count and bias for loop. */
+ add dst, dst, 128
+1: dc zva, dst
add dst, dst, 64
subs count, count, 64
- b.hi L(no_zva_loop)
+ b.hi 1b
+ stp q0, q0, [dst, 0]
+ stp q0, q0, [dst, 32]
stp q0, q0, [dstend, -64]
stp q0, q0, [dstend, -32]
ret
#ifndef ZVA64_ONLY
- .p2align 4
+ .p2align 3
L(zva_128):
- cmp zva_val, 5 /* ZVA size is 128 bytes. */
- b.ne L(no_zva)
+ cmp tmp1w, 5 /* ZVA size is 128 bytes. */
+ b.ne L(zva_other)
+ str q0, [dst, 16]
stp q0, q0, [dst, 32]
stp q0, q0, [dst, 64]
stp q0, q0, [dst, 96]
bic dst, dst, 127
sub count, dstend, dst /* Count is now 128 too large. */
- sub count, count, 128 + 128 /* Adjust count and bias for loop. */
-1: add dst, dst, 128
- dc zva, dst
+ sub count, count, 128+128 /* Adjust count and bias for loop. */
+ add dst, dst, 128
+1: dc zva, dst
+ add dst, dst, 128
subs count, count, 128
b.hi 1b
stp q0, q0, [dstend, -128]
@@ -158,6 +156,35 @@ L(zva_128):
stp q0, q0, [dstend, -64]
stp q0, q0, [dstend, -32]
ret
+
+L(zva_other):
+ mov tmp2w, 4
+ lsl zva_lenw, tmp2w, tmp1w
+ add tmp1, zva_len, 64 /* Max alignment bytes written. */
+ cmp count, tmp1
+ blo L(no_zva)
+
+ sub tmp2, zva_len, 1
+ add tmp1, dst, zva_len
+ add dst, dst, 16
+ subs count, tmp1, dst /* Actual alignment bytes to write. */
+ bic tmp1, tmp1, tmp2 /* Aligned dc zva start address. */
+ beq 2f
+1: stp q0, q0, [dst], 64
+ stp q0, q0, [dst, -32]
+ subs count, count, 64
+ b.hi 1b
+2: mov dst, tmp1
+ sub count, dstend, tmp1 /* Remaining bytes to write. */
+ subs count, count, zva_len
+ b.lo 4f
+3: dc zva, dst
+ add dst, dst, zva_len
+ subs count, count, zva_len
+ b.hs 3b
+4: add count, count, zva_len
+ sub dst, dst, 32 /* Bias dst for tail loop. */
+ b L(tail64)
#endif
END (MEMSET)

View File

@ -1,37 +0,0 @@
Short description: Fix newlocale error return.
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Bug-RHEL: #832516
Bug-Fedora: #827510
Bug-Upstream: #14247
Upstream status: not-submitted
This needs to go upstream right away to fix the error case for
newlocale not correctly returning an error.
2012-06-14 Jeff Law <law@redhat.com>
* locale/loadlocale.c (_nl_load_locale): Delay setting
file->decided until we have successfully loaded the file's
data.
diff --git a/locale/loadlocale.c b/locale/loadlocale.c
index e3fa187..9fd9216 100644
--- a/locale/loadlocale.c
+++ b/locale/loadlocale.c
@@ -169,7 +169,6 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
int save_err;
int alloc = ld_mapped;
- file->decided = 1;
file->data = NULL;
fd = __open_nocancel (file->filename, O_RDONLY | O_CLOEXEC);
@@ -278,6 +277,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
newdata->alloc = alloc;
file->data = newdata;
+ file->decided = 1;
}
void

2130
glibc.spec

File diff suppressed because it is too large Load Diff

View File

@ -1 +1 @@
SHA512 (glibc-2.38.9000-530-gddf542da94.tar.xz) = d6e19bbc1eaa22833124d2068570f0943fa3bac130ecc433875514e281fdabfcb976f67cf33c052d06a8ce7ab91134622e2d4df143d4efb1b4627b4c342960a7
SHA512 (glibc-2.40.9000-399-ge2436d6f5a.tar.xz) = f50cb28fd54bc7dd77903e939e43aedff63e3ac7896b6c4a1e1938fea4c190512857d7a954971e9037b85a727795bb3c5692f4d85848ceaa9cd47fdb1c96aac2

View File

@ -0,0 +1,63 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /tools/glibc/Regression/ESTALE-error-message-translation-regression-from-RHEL7
# Description: What the test does
# Author: Sergey Kolosov <skolosov@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2023 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/tools/glibc/Regression/ESTALE-error-message-translation-regression-from-RHEL7
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE estale-test.c refs
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Sergey Kolosov <skolosov@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: What the test does" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 10m" >> $(METADATA)
@echo "RunFor: glibc" >> $(METADATA)
@echo "Requires: gcc glibc-devel glibc-langpack-es glibc-langpack-ja glibc-langpack-fr glibc-langpack-de glibc-langpack-it glibc-langpack-ko glibc-langpack-pt glibc-langpack-ru glibc-langpack-zh" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Releases: -RHEL6 -RHEL7" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -0,0 +1,3 @@
PURPOSE of /tools/glibc/Regression/ESTALE-error-message-translation-regression-from-RHEL7
Description: What the test does
Author: Sergey Kolosov <skolosov@redhat.com>

View File

@ -0,0 +1,14 @@
#include <stdio.h>
#include <locale.h>
#include <errno.h>
int
main (void)
{
setlocale (LC_ALL, "");
errno = ESTALE;
perror ("ESTALE");
errno = EAGAIN;
perror ("EAGAIN");
return 0;
}

View File

@ -0,0 +1,25 @@
summary: What the test does
description: ''
contact: Sergey Kolosov <skolosov@redhat.com>
component:
- glibc
adjust:
- enabled: false
when: distro < rhel-8.9
test: ./runtest.sh
framework: beakerlib
recommend:
- gcc
- glibc-devel
- glibc-langpack-es
- glibc-langpack-ja
- glibc-langpack-fr
- glibc-langpack-de
- glibc-langpack-it
- glibc-langpack-ko
- glibc-langpack-pt
- glibc-langpack-ru
- glibc-langpack-zh
duration: 10m
extra-summary: /tools/glibc/Regression/ESTALE-error-message-translation-regression-from-RHEL7
extra-task: /tools/glibc/Regression/ESTALE-error-message-translation-regression-from-RHEL7

View File

@ -0,0 +1,2 @@
ESTALE: Veraltete Dateizugriffsnummer (file handle)
EAGAIN: Die Ressource ist zur Zeit nicht verfügbar

View File

@ -0,0 +1,2 @@
ESTALE: Veraltete Dateizugriffsnummer (file handle)
EAGAIN: Die Ressource ist zur Zeit nicht verfügbar

View File

@ -0,0 +1,2 @@
ESTALE: Stale file handle
EAGAIN: Resource temporarily unavailable

View File

@ -0,0 +1,2 @@
ESTALE: `handle' de fichero en desuso
EAGAIN: Recurso no disponible temporalmente

View File

@ -0,0 +1,2 @@
ESTALE: Panne d'accès au fichier
EAGAIN: Ressource temporairement non disponible

View File

@ -0,0 +1,2 @@
ESTALE: Panne d'accès au fichier
EAGAIN: Ressource temporairement non disponible

View File

@ -0,0 +1,2 @@
ESTALE: Riferimento al file obsoleto
EAGAIN: Risorsa temporaneamente non disponibile

View File

@ -0,0 +1,2 @@
ESTALE: 古いファイルハンドルです
EAGAIN: リソースが一時的に利用できません

View File

@ -0,0 +1,2 @@
ESTALE: 古いファイルハンドルです
EAGAIN: リソースが一時的に利用できません

View File

@ -0,0 +1,2 @@
ESTALE: 끊어진 파일 핸들
EAGAIN: 자원이 일시적으로 사용 불가능함

View File

@ -0,0 +1,2 @@
ESTALE: Manipulador de arquivo corrompido
EAGAIN: Recurso temporariamente indisponível

View File

@ -0,0 +1,2 @@
ESTALE: Устаревший дескриптор файла
EAGAIN: Ресурс временно недоступен

View File

@ -0,0 +1,2 @@
ESTALE: 过旧的文件句柄
EAGAIN: 资源暂时不可用

View File

@ -0,0 +1,2 @@
ESTALE: 过旧的文件控柄
EAGAIN: 资源暂时不可用

View File

@ -0,0 +1,2 @@
ESTALE: 過舊的檔案控柄
EAGAIN: 資源暫時無法取得

View File

@ -0,0 +1,69 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/ESTALE-error-message-translation-regression-from-RHEL7
# Description: What the test does
# Author: Sergey Kolosov <skolosov@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2023 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
TESTPROG="estale-test"
TESTED_LANGS="de_AT de_DE en_US es_ES fr_FR fr_FR.utf8 it_IT ja_JP ja_JP.utf8 ko_KR.utf8 pt_BR.utf8 ru_UA.utf8 zh_CN.utf8 zh_TW.utf8"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
PACKNVR=$(rpm -q ${PACKAGE}.`arch`)
rlRun "TESTTMPDIR=$(mktemp -d)"
rlRun "cp ${TESTPROG}.c $TESTTMPDIR"
rlRun "cp refs/orig_* $TESTTMPDIR"
rlRun "pushd $TESTTMPDIR"
rlPhaseEnd
rlPhaseStartTest prepare
rlRun -c "gcc ${TESTPROG}.c -o $TESTPROG"
rlAssertExists "$TESTPROG"
rlPhaseEnd
for L in $TESTED_LANGS
do
rlPhaseStartTest estale-test-$L
rlRun -c "LANG=$L ./${TESTPROG} 2> out_$L"
if rlIsRHEL "<=9" && [ -f orig_${L}_rhel ]
then
rlAssertNotDiffer out_$L orig_${L}_rhel
else
rlAssertNotDiffer out_$L orig_$L
fi
rlLogInfo "out_$L:\n$(cat out_$L)"
rlPhaseEnd
done
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TESTTMPDIR"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /tools/glibc/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc
# Description: Test for BZ#1430477 (glibc Missing else branch in __libc_calloc)
# Author: Sergey Kolosov <skolosov@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2017 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/tools/glibc/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Sergey Kolosov <skolosov@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test for BZ#1430477 (glibc Missing else branch in __libc_calloc)" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 2h" >> $(METADATA)
@echo "RunFor: glibc" >> $(METADATA)
@echo "Requires: glibc rpm-build" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 1430477" >> $(METADATA)
@echo "Releases: -RHEL4 -RHEL5 -RHEL6" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -0,0 +1,8 @@
PURPOSE of /tools/glibc/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc
Description: Test for BZ#1430477 (glibc Missing else branch in __libc_calloc)
Author: Sergey Kolosov <skolosov@redhat.com>
Bug summary: glibc: Missing else branch in __libc_calloc
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1430477
The test builds glibc, then does malloc.o recompilation and does checking that
there are no missing initializations for oldtop and oldtopsize variables.

View File

@ -0,0 +1,23 @@
summary: Test for BZ#1430477 (glibc Missing else branch in __libc_calloc)
description: |
Bug summary: glibc: Missing else branch in __libc_calloc
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1430477
The test builds glibc, then does malloc.o recompilation and does checking
that there are no missing initializations for oldtop and oldtopsize
variables.
contact: Sergey Kolosov <skolosov@redhat.com>
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1430477
component:
- glibc
test: ./runtest.sh
framework: beakerlib
recommend:
- glibc
- rpm-build
duration: 2h
extra-summary:
/tools/glibc/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc
extra-task:
/tools/glibc/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc

View File

@ -0,0 +1,104 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc
# Description: Test for BZ#1430477 (glibc Missing else branch in __libc_calloc)
# Author: Sergey Kolosov <skolosov@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2017 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
rlJournalStart
rlPhaseStartSetup
PRARCH="$(rlGetPrimaryArch)"
BUILDDIR="$(rpm -E '%{_builddir}')"
SPECDIR="$(rpm -E '%{_specdir}')"
rlAssertRpm $PACKAGE
rlLog "Build directory: $BUILDDIR"
rlLog "Spec directory: $SPECDIR"
rlLog "Architecture : $PRARCH"
rlLog "Cleaning build and spec directories of glibc files"
rlRun "rm -rf $BUILDDIR/glibc*" 0 "Cleaning $BUILDDIR/glibc*"
rlRun "rm -rf $SPECDIR/glibc*.spec" 0 "Cleaning $SPECDIR/glibc*.spec"
rlRun "rm -rf glibc*.src.rpm" 0 "Removing any present glibc src.rpm"
rlLog "Installing glibc srpm"
rlFetchSrcForInstalled $PACKAGE
rlRun "rpm -Uhv $PACKAGE*.src.rpm"
rlAssertExists $SPECDIR/$PACKAGE.spec
rlRun "yum-builddep -y $PACKAGE-*.src.rpm" 0 "Installing dependences"
rlPhaseEnd
rlPhaseStartTest "Building glibc"
rlRun "rpmbuild -bc ${SPECDIR}/${PACKAGE}.spec &> glibc_build_log.txt" 0 "Unpacking $PACKAGE"
ISSUCCESS=$?
if [ $ISSUCCESS -ne 0 ]
then
rlFileSubmit glibc_build_log.txt
rlFail "Glibc compilation error"
fi
if rlIsRHEL "==10"; then
BUILDS="$BUILDDIR/glibc-2.39/build*"
elif rlIsFedora ">=41"; then
BUILDS="$BUILDDIR/glibc*build/glibc*/build*"
else
BUILDS="$BUILDDIR/glibc*/build*"
fi
rlLog "Found builds at:"
for build in $BUILDS; do
rlLog "$build"
done; unset build
rlPhaseEnd
rlPhaseStartTest "Check for uninitialized values"
for CURBUILD in $BUILDS
do
rlRun -c "pushd $CURBUILD"
rlRun -c "rm malloc/malloc.o"
rlRun -c "make -r PARALLELMFLAGS="" -C .. -C malloc objdir=`pwd` subdir=malloc &> malloc_build_log.txt"
rlAssertExists malloc_build_log.txt
rlAssertNotGrep "oldtop may be used uninitialized in this function" malloc_build_log.txt
rlAssertNotGrep "oldtopsize may be used uninitialized in this function" malloc_build_log.txt
rlFileSubmit malloc_build_log.txt ${CURBUILD}_malloc_build_log
rlRun -c "popd"
done
rlPhaseEnd
rlPhaseStartCleanup
if [ -n "$KEEP_GLIBC_RESULTS" ]; then
rlLog "$(pwd) contains:"
rlLog "$(ls $(pwd))"
rlLog "Build Directory at: $(ls $BUILDDIR)"
rlLog "Spec File at: $(ls $SPECDIR/glibc*.spec)"
else
rlRun "rm glibc*.src.rpm"
rlRun "rm -rf $BUILDDIR/glibc* $SPECDIR/glibc*.spec"
fi
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -53,7 +53,7 @@ $(METADATA): Makefile
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 30m" >> $(METADATA)
@echo "RunFor: glibc" >> $(METADATA)
@echo "Requires: glibc-devel glibc-debuginfo glibc-debuginfo-common gdb" >> $(METADATA)
@echo "Requires: glibc-devel glibc-debuginfo gdb" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)

View File

@ -11,11 +11,11 @@ component:
- glibc
test: ./runtest.sh
framework: beakerlib
recommend:
require:
- glibc-devel
- glibc-debuginfo
- glibc-debuginfo-common
- gdb
- gcc
duration: 30m
extra-summary:
/tools/glibc/Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value

View File

@ -1,5 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define BUFSIZE 1024
int main(int argc, char *argv[]) {
int r=0,i,attempts=0;

View File

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /tools/glibc/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports
# Description: Test for BZ#1577212 (glibc Remove stray Sun RPC exports)
# Author: Alexandra Hájková <ahajkova@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2019 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/tools/glibc/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Alexandra Hájková <ahajkova@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test for BZ#1577212 (glibc Remove stray Sun RPC exports)" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 1h" >> $(METADATA)
@echo "RunFor: glibc" >> $(METADATA)
@echo "Requires: glibc elfutils" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 1577212" >> $(METADATA)
@echo "Releases: -RHEL4 -RHEL5 -RHEL6 -RHEL7" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -0,0 +1,9 @@
PURPOSE of /tools/glibc/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports
Description: Test for BZ#1577212 (glibc Remove stray Sun RPC exports)
Author: Alexandra Hájková <ahajkova@redhat.com>
Bug summary: glibc: Remove stray Sun RPC exports
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1577212
Remove stray Sun RPC exports: In this context, “remove“ means that the default symbol version (the @@ part)
is gone, and there is only a compat symbol (with a single @). We cannot remove the compat symbols for
backwards compatibility reasons.

View File

@ -0,0 +1,24 @@
summary: Test for BZ#1577212 (glibc Remove stray Sun RPC exports)
description: |
Bug summary: glibc: Remove stray Sun RPC exports
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1577212
Remove stray Sun RPC exports: In this context, “remove“ means that the
default symbol version (the @@ part) is gone, and there is only a compat
symbol (with a single @). We cannot remove the compat symbols for backwards
compatibility reasons.
contact: Alexandra Hájková <ahajkova@redhat.com>
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1577212
component:
- glibc
test: ./runtest.sh
framework: beakerlib
recommend:
- glibc
- elfutils
duration: 1h
extra-summary:
/tools/glibc/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports
extra-task:
/tools/glibc/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports

View File

@ -0,0 +1,54 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports
# Description: Test for BZ#1577212 (glibc Remove stray Sun RPC exports)
# Author: Alexandra Hájková <ahajkova@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2019 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest
rlRun "eu-readelf --symbols=.dynsym /usr/lib64/libc.so.6 > log"
rlAssertNotGrep "svcauthdes_stats@@" log
rlAssertNotGrep "svc_pollfd@@" log
rlAssertNotGrep "rpc_createerr@@" log
rlAssertNotGrep "svc_fdset@@" log
rlAssertNotGrep "svc_max_pollfd@@" log
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -53,7 +53,7 @@ $(METADATA): Makefile
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 20m" >> $(METADATA)
@echo "RunFor: glibc" >> $(METADATA)
@echo "Requires: glibc glibc-debuginfo glibc-debuginfo-common glibc-common-debuginfo binutils" >> $(METADATA)
@echo "Requires: glibc glibc-debuginfo glibc-common-debuginfo binutils" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)

View File

@ -9,10 +9,9 @@ component:
- glibc
test: ./runtest.sh
framework: beakerlib
recommend:
require:
- glibc
- glibc-debuginfo
- glibc-debuginfo-common
- glibc-common-debuginfo
- binutils
duration: 20m

View File

@ -14,5 +14,6 @@ recommend:
- glibc
- gdb
duration: 15m
order: 1000
extra-summary: /tools/glibc/Regression/bz1661513-glibc-Adjust-to-rpms-find-debuginfo-sh-changes-to-keep-stripping-binaries
extra-task: /tools/glibc/Regression/bz1661513-glibc-Adjust-to-rpms-find-debuginfo-sh-changes-to-keep-stripping-binaries

View File

@ -48,7 +48,7 @@ rlJournalStart
rlAssertGrep "ldconfig.*, stripped" output.log
rlAssertGrep "iconvconfig.*, stripped" output.log
rlAssertGrep "localedef.*, stripped" output.log
rlAssertGrep "ld-.*, not stripped" output.log
rlAssertGrep "$(readlink -f /usr/bin/ld.so).*, not stripped" output.log
rlLogInfo "Content of output.log:\n$(cat output.log)"
# some debugging info (e.g. pthread struct) should be accessible even without installed debuginfo packages

View File

@ -7,6 +7,9 @@ link:
contact: Sergey Kolosov <skolosov@redhat.com>
component:
- glibc
adjust:
- enabled: false
when: distro < rhel-9
test: ./runtest.sh
framework: beakerlib
recommend:

View File

@ -5,6 +5,9 @@ description: |
contact: Sergey Kolosov <skolosov@redhat.com>
component:
- glibc
adjust:
- enabled: false
when: distro < rhel-9
test: ./runtest.sh
framework: beakerlib
recommend:

View File

@ -7,6 +7,9 @@ link:
contact: Sergey Kolosov <skolosov@redhat.com>
component:
- glibc
adjust:
- enabled: false
when: distro < rhel-9
test: ./runtest.sh
framework: beakerlib
recommend:

View File

@ -7,6 +7,9 @@ link:
contact: Sergey Kolosov <skolosov@redhat.com>
component:
- glibc
adjust:
- enabled: false
when: distro < rhel-9
test: ./runtest.sh
framework: beakerlib
recommend:

View File

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /tools/glibc/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when
# Description: Test for BZ#2110357 (glibc mktime() fails with -EOVERFLOW when)
# Author: Sergey Kolosov <skolosov@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2022 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/tools/glibc/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE tst-mktime.c
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Sergey Kolosov <skolosov@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test for BZ#2110357 (glibc mktime() fails with -EOVERFLOW when)" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 10m" >> $(METADATA)
@echo "RunFor: glibc" >> $(METADATA)
@echo "Requires: glibc glibc-devel gcc" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 2110357" >> $(METADATA)
@echo "Releases: -RHEL4 -RHEL6 -RHELClient5 -RHELServer5" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -0,0 +1,5 @@
PURPOSE of /tools/glibc/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when
Description: Test for BZ#2110357 (glibc mktime() fails with -EOVERFLOW when)
Author: Sergey Kolosov <skolosov@redhat.com>
Bug summary: glibc: mktime() fails with -EOVERFLOW when tm_isdst=1 and a neighboring DST boundary is far from tm_year
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=2110357

View File

@ -0,0 +1,18 @@
summary: Test for BZ#2110357 (glibc mktime() fails with -EOVERFLOW when)
description: |
Bug summary: glibc: mktime() fails with -EOVERFLOW when tm_isdst=1 and a neighboring DST boundary is far from tm_year
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=2110357
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=2110357
contact: Sergey Kolosov <skolosov@redhat.com>
component:
- glibc
test: ./runtest.sh
framework: beakerlib
recommend:
- glibc
- glibc-devel
- gcc
duration: 10m
extra-summary: /tools/glibc/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when
extra-task: /tools/glibc/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when

View File

@ -0,0 +1,54 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when
# Description: Test for BZ#2110357 (glibc mktime() fails with -EOVERFLOW when)
# Author: Sergey Kolosov <skolosov@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2022 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
TESTPROG="tst-mktime"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
PACKNVR=$(rpm -q ${PACKAGE}.`arch`)
rlRun "TESTTMPDIR=$(mktemp -d)"
rlRun "cp ${TESTPROG}.c $TESTTMPDIR"
rlRun "pushd $TESTTMPDIR"
rlPhaseEnd
rlPhaseStartTest
rlRun -c "gcc ${TESTPROG}.c -o $TESTPROG"
rlAssertExists "$TESTPROG"
rlRun -c "./${TESTPROG}"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TESTTMPDIR"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,24 @@
#include <time.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
time_t t;
struct tm tm;
setenv("TZ", "Asia/Tokyo", 1);
memset(&tm, 0, sizeof(tm));
tm.tm_mday = 1;
tm.tm_mon = 1;
tm.tm_year = 2023;
tm.tm_isdst = 1;
t = mktime(&tm);
printf("mktime(&tm) = %d\n", t);
if (t < 0)
exit(1);
return 0;
}

View File

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /tools/glibc/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in
# Description: Test for BZ#2115831 (glibc missing .gnu_debuglink section in libc.so.6,)
# Author: Sergey Kolosov <skolosov@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2022 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/tools/glibc/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Sergey Kolosov <skolosov@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test for BZ#2115831 (glibc missing .gnu_debuglink section in libc.so.6,)" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 20m" >> $(METADATA)
@echo "RunFor: glibc" >> $(METADATA)
@echo "Requires: elfutils glibc glibc-debuginfo" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 2115831" >> $(METADATA)
@echo "Releases: RHEL8 RHEL9" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -0,0 +1,5 @@
PURPOSE of /tools/glibc/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in
Description: Test for BZ#2115831 (glibc missing .gnu_debuglink section in libc.so.6,)
Author: Sergey Kolosov <skolosov@redhat.com>
Bug summary: glibc: missing .gnu_debuglink section in libc.so.6, redundant annobin symbols and debufginfo for ld.so
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=2115831

View File

@ -0,0 +1,19 @@
enabled: false
summary: Test for BZ#2115831 (glibc missing .gnu_debuglink section in libc.so.6,)
description: |
Bug summary: glibc: missing .gnu_debuglink section in libc.so.6, redundant annobin symbols and debufginfo for ld.so
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=2115831
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=2115831
contact: Sergey Kolosov <skolosov@redhat.com>
component:
- glibc
test: ./runtest.sh
framework: beakerlib
require:
- elfutils
- glibc
- glibc-debuginfo
duration: 20m
extra-summary: /tools/glibc/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in
extra-task: /tools/glibc/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in

View File

@ -0,0 +1,68 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/glibc/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in
# Description: Test for BZ#2115831 (glibc missing .gnu_debuglink section in libc.so.6,)
# Author: Sergey Kolosov <skolosov@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2022 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="glibc"
LIBC_SO_6_LIBS=$(find /usr/lib/ /usr/lib64/ -name libc.so.6)
TESTL2="/usr/bin/ld.so"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
PACKNVR=$(rpm -q ${PACKAGE}.`arch`)
rlRun "TESTTMPDIR=$(mktemp -d)"
rlRun "pushd $TESTTMPDIR"
rlPhaseEnd
rlPhaseStartTest
rlRun -l "rpm -ql glibc-debuginfo"
for LIB in $LIBC_SO_6_LIBS; do
rlRun -l "eu-readelf -S $LIB | grep -q .debug_" 1
rlRun -l "eu-readelf -S $LIB | grep -q .gnu_debuglink" 0
done
rlRun -l "eu-readelf -S $TESTL2 | grep -q .debug_" 0
rlRun -l "eu-readelf -S $TESTL2 | grep -q .gnu_debuglink" 1
rlRun -l "eu-readelf -s $TESTL2 | grep -q annobin" 1
if rlIsRHEL "8"; then
rlRun -l "rpm -ql glibc-debuginfo|sort|grep '/ld-$(rpm -q --qf "%{VERSION}" ${PACKAGE}.`arch`)'" 1
rlRun -l "rpm -ql glibc-debuginfo|sort|grep '/libc-$(rpm -q --qf "%{VERSION}" ${PACKAGE}.`arch`)'" 0
elif rlIsRHEL ">=9" || rlIsFedora; then
rlRun -l "rpm -ql glibc-debuginfo|sort|grep ld-linux-" 1
rlRun -l "rpm -ql glibc-debuginfo|sort|grep libc.so.6-" 0
else
rlFail "Test does not support current distro (yet?)!"
fi
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TESTTMPDIR"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -13,8 +13,9 @@ contact: Petr Muller <pmuller@redhat.com>
component:
- glibc
test: ./runtest.sh
tier: 2
framework: beakerlib
recommend:
require:
- glibc
- gcc
tag:

View File

@ -40,7 +40,7 @@ rlJournalStart
rlPhaseEnd
rlPhaseStartTest
rlRun -c "gcc ${TESTPROG}.c -o $TESTPROG"
rlRun -c "gcc -pthread ${TESTPROG}.c -o $TESTPROG"
rlAssertExists "$TESTPROG"
rlRun -c "./${TESTPROG}"
rlPhaseEnd

View File

@ -77,6 +77,7 @@ test: ./runtest.sh
framework: beakerlib
recommend:
- glibc
- gcc
tag:
- simple
- tier1_mfranc

View File

@ -1,5 +1,6 @@
#include <stdio.h>
#include <string.h>
#include <unistd.h>
int
main (void)

View File

@ -34,7 +34,7 @@ PACKAGE="glibc"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun 'gcc optinit.c -o optinit' 0 "Compiling the testcase"
rlRun 'gcc -D_GNU_SOURCE optinit.c -o optinit' 0 "Compiling the testcase"
rlPhaseEnd
rlPhaseStartTest

View File

@ -149,6 +149,7 @@ contact: Petr Muller <pmuller@redhat.com>
component:
- glibc
test: ./runtest.sh
tier: 2
framework: beakerlib
require:
- gcc

View File

@ -5,6 +5,7 @@
#include <time.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
void func(sem_t *semp)
{

View File

@ -92,6 +92,7 @@ contact: Petr Muller <pmuller@redhat.com>
component:
- glibc
test: ./runtest.sh
tier: 2
framework: beakerlib
require:
- make

View File

@ -50,8 +50,9 @@ contact: Petr Muller <pmuller@redhat.com>
component:
- glibc
test: ./runtest.sh
tier: 1
framework: beakerlib
recommend:
require:
- glibc
- gcc
- libgomp

View File

@ -127,6 +127,7 @@ contact: Petr Muller <pmuller@redhat.com>
component:
- glibc
test: ./runtest.sh
tier: 1
framework: beakerlib
require:
- gcc

View File

@ -10,8 +10,9 @@ contact: Miroslav Franc <mfranc@redhat.com>
component:
- glibc
test: ./runtest.sh
tier: 1
framework: beakerlib
recommend:
require:
- glibc
- gcc
tag:

View File

@ -45,8 +45,9 @@ contact: Miroslav Franc <mfranc@redhat.com>
component:
- glibc
test: ./runtest.sh
tier: 1
framework: beakerlib
recommend:
require:
- glibc
tag:
- simple

View File

@ -6,8 +6,9 @@ contact: Miroslav Franc <mfranc@redhat.com>
component:
- glibc
test: ./runtest.sh
tier: 1
framework: beakerlib
recommend:
require:
- glibc
- gcc
- glibc-devel

View File

@ -6,8 +6,9 @@ contact: Miroslav Franc <mfranc@redhat.com>
component:
- glibc
test: ./runtest.sh
tier: 1
framework: beakerlib
recommend:
require:
- glibc
- binutils
tag:

View File

@ -6,8 +6,9 @@ contact: Miroslav Franc <mfranc@redhat.com>
component:
- glibc
test: ./runtest.sh
tier: 1
framework: beakerlib
recommend:
require:
- glibc
- gcc
tag:

View File

@ -6,11 +6,11 @@ contact: Miroslav Franc <mfranc@redhat.com>
component:
- glibc
test: ./runtest.sh
tier: 1
framework: beakerlib
recommend:
require:
- glibc
- glibc-devel
- glibc-headers
- gcc
- coreutils
tag:

View File

@ -6,8 +6,9 @@ contact: Miroslav Franc <mfranc@redhat.com>
component:
- glibc
test: ./runtest.sh
tier: 1
framework: beakerlib
recommend:
require:
- glibc
- gcc
tag:

View File

@ -6,8 +6,9 @@ contact: Miroslav Franc <mfranc@redhat.com>
component:
- glibc
test: ./runtest.sh
tier: 1
framework: beakerlib
recommend:
require:
- glibc
- gcc
tag:

View File

@ -1,6 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
#include <wchar.h>
int main(int argc, char** argv)
{

View File

@ -6,6 +6,7 @@ contact: Miroslav Franc <mfranc@redhat.com>
component:
- glibc
test: ./runtest.sh
tier: 1
framework: beakerlib
recommend:
- glibc

View File

@ -1,5 +1,8 @@
summary: Tests if 'getaddrinfo' returns FQDN in ai_canonname.
description: ''
adjust:
- enabled: false
when: distro > rhel-9
contact: Arjun Shankar <ashankar@redhat.com>
component:
- glibc

View File

@ -1,6 +1,7 @@
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
unsigned int *chunk;
@ -17,8 +18,8 @@ int main(void) {
*/
chunk[0] = -0x10; /* prev_size */
chunk[1] = 0x8; /* size */
chunk[2] = shellcode; /* fd */
chunk[3] = shellcode; /* bk */
chunk[2] = (int) shellcode; /* fd */
chunk[3] = (int) shellcode; /* bk */
/* set fd to the adres of the return address - 3
the minus 3 is needed because fd[3] will become bk

View File

@ -1,4 +1,7 @@
main()
#include <stdlib.h>
#include <stdio.h>
int main()
{
int *a,*b,*c,*d,*e;
b=malloc(8);

View File

@ -5,8 +5,9 @@ contact: Petr Muller <pmuller@redhat.com>
component:
- glibc
test: ./runtest.sh
tier: 2
framework: beakerlib
recommend:
require:
- glibc
- glibc-devel
- gcc

View File

@ -5,8 +5,9 @@ contact: David Malcolm <dmalcolm@redhat.com>
component:
- glibc
test: ./runtest.sh
tier: 2
framework: beakerlib
recommend:
require:
- glibc
- gcc-c++
tag:

View File

@ -15,7 +15,7 @@ int main(){
two[3] = '\0';
fprintf(fp, "Two: %s, length %d\n", two, strlen(two));
close(fp);
fclose(fp);
free(two);
return 0;
}

View File

@ -8,6 +8,6 @@ int main(){
fprintf(fp, "SIN: %0.2f\n", 1.0);
close(fp);
fclose(fp);
return 0;
}

View File

@ -41,6 +41,6 @@ int main(){
pthread_join(tw, NULL);
pthread_join(on, NULL);
close(fp);
fclose(fp);
return 0;
}

View File

@ -1,4 +1,5 @@
#include <stdio.h>
#include <sys/mman.h>
#include <fcntl.h>
int main(){
@ -16,6 +17,6 @@ int main(){
else
fprintf(fp, "shm_unlink successful\n");
close(fp);
fclose(fp);
return 0;
}

View File

@ -7,6 +7,9 @@ link:
contact: Martin Coufal <mcoufal@redhat.com>
component:
- glibc
adjust:
- enabled: false
when: distro < rhel-8.6
test: ./runtest.sh
framework: beakerlib
recommend:

View File

@ -1,3 +1,5 @@
#include <unistd.h>
#define MESG "you are not suppposed to see this\n"
int main()

View File

@ -6,8 +6,9 @@ contact: Miroslav Franc <mfranc@redhat.com>
component:
- glibc
test: ./runtest.sh
tier: 1
framework: beakerlib
recommend:
require:
- glibc
- glibc-static
- glibc-common

View File

@ -18,7 +18,13 @@ set -ex
workdir="$(mktemp -d -t find_debuginfo.XXXXXX)"
ldso_tmp="$workdir/ld.so"
libc_tmp="$workdir/libc.so"
libc_tmp_dir="$workdir/"
# Return the path where a libc should be saved temporarily. This path is
# based on its original path received in $1.
libc_tmp_path() {
echo "$libc_tmp_dir"`dirname "$1"`"/libc.so"
}
# Prefer a separately installed debugedit over the RPM-integrated one.
if command -v debugedit >/dev/null ; then
@ -34,54 +40,65 @@ trap cleanup 0
sysroot_path="$1"
shift
# Resolve symbolic link, so that the activities below only alter the
# file it points to.
ldso_path="$(readlink -f "$sysroot_path/$1")"
shift
script_path="$1"
shift
# See ldso_path setting in glibc.spec.
ldso_path=
for ldso_candidate in `find "$sysroot_path" -maxdepth 2 \
-regextype posix-extended -regex '.*/ld(-.*|64|)\.so\.[0-9]+$' -type f` ; do
if test -z "$ldso_path" ; then
ldso_path="$ldso_candidate"
else
echo "error: multiple ld.so candidates: $ldso_path, $ldso_candidate"
exit 1
fi
done
# libc.so.6 always uses this name, so it is simpler to locate.
libc_path=
for libc_candidate in `find "$sysroot_path" -maxdepth 2 -name libc.so.6`; do
if test -z "$libc_path" ; then
libc_path="$libc_candidate"
else
echo "error: multiple libc.so.6 candidates: $libc_path, $libc_candidate"
exit 1
fi
done
# This can result in multiple paths, hence the loop below.
libc_path=`find "$sysroot_path" -name libc.so.6`
# Preserve the original files.
cp "$ldso_path" "$ldso_tmp"
cp "$libc_path" "$libc_tmp"
for lib in $libc_path ; do
libtmp=`libc_tmp_path $lib`
mkdir -p `dirname "$libtmp"`
cp "$lib" "$libtmp"
done
# 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"
for lib in $libc_path ; do
libtmp=`libc_tmp_path "$lib"`
# libc.so.6: Extract the .gnu_debuglink section
objcopy -j.gnu_debuglink --set-section-flags .gnu_debuglink=alloc \
-O binary "$lib" "$libtmp.debuglink"
# Restore the original files.
cp "$libtmp" "$lib"
# Restore the original files.
# Reduce the size of libc notes. Primarily for annobin.
objcopy --merge-notes "$lib"
# libc.so.6: Restore the .gnu_debuglink section
objcopy --add-section .gnu_debuglink="$libtmp.debuglink" "$lib"
# 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__*' \
"$lib"
done
# Restore the original ld.so.
cp "$ldso_tmp" "$ldso_path"
cp "$libc_tmp" "$libc_path"
# Reduce the size of notes. Primarily for annobin.
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.
@ -98,22 +115,6 @@ for ldso_debug_candidate in `find "$sysroot_path" -maxdepth 2 \
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_*
# 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
# locations. First compute the arguments for invoking debugedit.
# See find-debuginfo.sh.
@ -137,7 +138,7 @@ 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" \
if nm --format=posix "$ldso_path" | cut -d' ' -f1 \
| grep '^\.annobin' > "$ldso_tmp.annobin-symbols"; then
objcopy --strip-symbols="$ldso_tmp.annobin-symbols" "$ldso_path"
fi