[Bug stdio/33935] _IO_wfile_doallocate not linked correctly when linking glibc statically
cvs-commit at gcc dot gnu.org
sourceware-bugzilla@sourceware.org
Tue Mar 10 16:25:34 GMT 2026
https://sourceware.org/bugzilla/show_bug.cgi?id=33935
--- Comment #1 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Adhemerval Zanella
<azanella@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7a5d6adc8e896da4b8d2b0cff8c0f321901ea5aa
commit 7a5d6adc8e896da4b8d2b0cff8c0f321901ea5aa
Author: Yunze Zhu <yunzezhu@linux.alibaba.com>
Date: Tue Mar 10 11:29:18 2026 +0800
libio: Properly link in function _IO_wfile_doallocate in static binaries
This patch addresses Bug 33935 - _IO_wfile_doallocate not linked correctly
when linking glibc statically.
https://sourceware.org/bugzilla/show_bug.cgi?id=33935
The function _IO_wfile_doallocate has been added with pragma weak in
vtable.c,
while it is the only one symbol contained in wfiledoalloc.c,
and has not been directly called in libio.
In static binaries the true function symbol _IO_wfile_doallocate may not
be correctly linked when linking glibc with cases contains wchar functions,
but the weak symbol in vtable is linked instead,
and cause segmentation fault when running.
This patch fixes this with similar way to symbol _IO_file_doallocate,
that add libio_static_fn_required(_IO_wfile_doallocate) in wgenops.c
to make _IO_wfile_doallocate always link in static binaries.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list