glibc/sysdeps
Frédéric Bérat 505c884aeb stdio: Ensure *_chk routines have their hidden builtin definition available
If libc_hidden_builtin_{def,proto} isn't properly set for *_chk routines,
there are unwanted PLT entries in libc.so.

There is a special case with __asprintf_chk:
If ldbl_* macros are used for asprintf, ABI gets broken on s390x,
if it isn't, ppc64le isn't building due to multiple asm redirections.

This is due to the inclusion of bits/stdio-lbdl.h for ppc64le whereas it
isn't for s390x. This header creates redirections, which are not
compatible with the ones generated using libc_hidden_def.
Yet, we can't use libc_hidden_ldbl_proto on s390x since it will not
create a simple strong alias (e.g. as done on x86_64), but a versioned
alias, leading to ABI breakage.

This results in errors on s390x:
/usr/bin/ld: glibc/iconv/../libio/bits/stdio2.h:137: undefined reference
to `__asprintf_chk'

Original __asprintf_chk symbols:
00000000001395b0 T __asprintf_chk
0000000000177e90 T __nldbl___asprintf_chk

__asprintf_chk symbols with ldbl_* macros:
000000000012d590 t ___asprintf_chk
000000000012d590 t __asprintf_chk@@GLIBC_2.4
000000000012d590 t __GI___asprintf_chk
000000000012d590 t __GL____asprintf_chk___asprintf_chk
0000000000172240 T __nldbl___asprintf_chk

__asprintf_chk symbols with the patch:
000000000012d590 t ___asprintf_chk
000000000012d590 T __asprintf_chk
000000000012d590 t __GI___asprintf_chk
0000000000172240 T __nldbl___asprintf_chk

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2023-07-05 16:59:48 +02:00
..
aarch64 aarch64: Add vector implementations of exp routines 2023-06-30 09:04:26 +01:00
alpha Fix a few more typos I missed in previous round -- BZ 25337 2023-06-02 23:46:32 +00:00
arc Fix misspellings in sysdeps/ -- BZ 25337 2023-05-30 23:02:29 +00:00
arm Fix misspellings in sysdeps/ -- BZ 25337 2023-05-30 23:02:29 +00:00
csky Fix misspellings in sysdeps/ -- BZ 25337 2023-05-30 23:02:29 +00:00
generic aarch64: Add vector implementations of cos routines 2023-06-30 09:04:10 +01:00
gnu Fix misspellings in sysdeps/ -- BZ 25337 2023-05-30 23:02:29 +00:00
hppa Fix a few more typos I missed in previous round -- BZ 25337 2023-06-02 23:46:32 +00:00
htl Fix misspellings in sysdeps/ -- BZ 25337 2023-05-30 23:02:29 +00:00
hurd hurd: Fix using interposable hurd_thread_self 2023-05-19 20:45:51 +02:00
i386 string: Ensure *_chk routines have their hidden builtin definition available 2023-07-05 16:59:48 +02:00
ia64 Fix misspellings in sysdeps/ -- BZ 25337 2023-05-30 23:02:29 +00:00
ieee754 stdio: Ensure *_chk routines have their hidden builtin definition available 2023-07-05 16:59:48 +02:00
loongarch LoongArch: Add support for dl_runtime_profile 2023-06-13 10:27:45 +08:00
m68k Fix misspellings in sysdeps/ -- BZ 25337 2023-05-30 23:02:29 +00:00
mach hurd: Implement MAP_EXCL 2023-07-03 01:38:14 +02:00
microblaze Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
mips Fix misspellings in sysdeps/ -- BZ 25337 2023-05-30 23:02:29 +00:00
nios2 Fix misspellings in sysdeps/ -- BZ 25337 2023-05-30 23:02:29 +00:00
nptl Fix misspellings in sysdeps/ -- BZ 25337 2023-05-30 23:02:29 +00:00
or1k Fix misspellings in sysdeps/ -- BZ 25337 2023-05-30 23:02:29 +00:00
posix hurd: readv: Get rid of alloca 2023-06-20 19:15:10 +02:00
powerpc sysdeps/powerpc/fpu/tst-setcontext-fpscr.c: Fix warn unused result 2023-06-22 00:21:17 -04:00
pthread Exclude routines from fortification 2023-07-05 16:59:48 +02:00
riscv Revert "riscv: Resolve symbols directly for symbols with STO_RISCV_VARIANT_CC." 2023-05-07 14:16:03 +02:00
s390 Fix misspellings in sysdeps/ -- BZ 25337 2023-05-30 23:02:29 +00:00
sh Fix misspellings in sysdeps/ -- BZ 25337 2023-05-30 23:02:29 +00:00
sparc Fix misspellings in sysdeps/ -- BZ 25337 2023-05-30 23:02:29 +00:00
unix Exclude routines from fortification 2023-07-05 16:59:48 +02:00
wordsize-32 Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
wordsize-64 hurd: Fix tst-writev test 2023-05-01 13:01:30 +02:00
x86 x86: Make dl-cache.h and readelflib.c not Linux-specific 2023-06-26 10:04:31 -03:00
x86_64 string: Ensure *_chk routines have their hidden builtin definition available 2023-07-05 16:59:48 +02:00