1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-10-26 00:57:39 +03:00
Files
glibc/libio
H.J. Lu b4ab549ae5 libio: Properly link in libio functions in static binaries
commit 3020f72618
Author: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Date:   Tue Dec 27 18:11:43 2022 -0300

    libio: Remove the usage of __libc_IO_vtables

added

 #define libio_static_fn_required(name) __asm (".globl " #name);

to link in libio functions in static binaries.  But there is no relocation
in
	.globl	_IO_file_open

and "strip --strip-unneeded" will remove such unreferenced symbols which
breaks static binaries.  Redefine libio_static_fn_required to create a
reference to the required function with

static __typeof (name) *const name##_p __attribute__((used)) = name;

This fixes BZ #33300.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Tested-by: Xi Ruoyao <xry111@xry111.site>
2025-08-22 12:03:00 -07:00
..
2023-06-13 19:59:08 -04:00
2023-06-01 12:40:05 -04:00
2023-06-01 12:40:05 -04:00
2023-06-01 12:40:05 -04:00
2025-04-22 17:00:34 +00:00
2021-09-03 22:06:44 +05:30
2025-04-14 13:27:12 +02:00
2021-06-02 07:32:19 +02:00