From d11bcbf6d2e8b2c23722681bbd66d5fad0c8b92b Mon Sep 17 00:00:00 2001 From: lijianglin Date: Thu, 8 Jun 2023 20:12:11 +0800 Subject: [PATCH] display declaration fstat function, make fstat call the system fstat function --- ...ion-fstat-function-make-fstat-call-t.patch | 32 +++++++++++++++++++ glibc.spec | 7 +++- testsuite_whitelist | 1 + 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 display-declaration-fstat-function-make-fstat-call-t.patch diff --git a/display-declaration-fstat-function-make-fstat-call-t.patch b/display-declaration-fstat-function-make-fstat-call-t.patch new file mode 100644 index 0000000..406da50 --- /dev/null +++ b/display-declaration-fstat-function-make-fstat-call-t.patch @@ -0,0 +1,32 @@ +From 3b1ee2b0be6ef6a78ae86482eb336f3ac2976fc8 Mon Sep 17 00:00:00 2001 +From: lijianglin +Date: Tue, 13 Jun 2023 11:12:22 +0800 +Subject: [PATCH] display declaration fstat function, make fstat call the + system fstat function + +the patch(commit 8ed005daf0ab03e142500324a34087ce179ae78) changed the implementation +process of interface fstat and used a new system call newfstatat, which resulted in a +decrease in the performance of fstat.this patch make fstat call the original system +call to restore performance. +--- + sysdeps/unix/sysv/linux/fxstat64.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/sysdeps/unix/sysv/linux/fxstat64.c b/sysdeps/unix/sysv/linux/fxstat64.c +index be127982..52775f7e 100644 +--- a/sysdeps/unix/sysv/linux/fxstat64.c ++++ b/sysdeps/unix/sysv/linux/fxstat64.c +@@ -76,6 +76,10 @@ strong_alias (___fxstat64, __fxstat64) + + #if XSTAT_IS_XSTAT64 + strong_alias (___fxstat64, __fxstat) ++int fstat (int __fd, struct stat *__statbuf) ++{ ++ return __fxstat (_STAT_VER, __fd, (struct stat64 *)__statbuf); ++} + #endif + + #endif /* LIB_COMPAT */ +-- +2.33.0 + diff --git a/glibc.spec b/glibc.spec index b0ddf32..8bdebe3 100644 --- a/glibc.spec +++ b/glibc.spec @@ -70,7 +70,7 @@ ############################################################################## Name: glibc Version: 2.34 -Release: 123 +Release: 124 Summary: The GNU libc libraries License: %{all_license} URL: http://www.gnu.org/software/glibc/ @@ -317,6 +317,8 @@ Patch9040: add-GB18030-2022-charmap.patch Patch9041: add-Wl-z-noseparate-code-for-so.patch %endif +Patch9042: display-declaration-fstat-function-make-fstat-call-t.patch + Provides: ldconfig rtld(GNU_HASH) bundled(gnulib) BuildRequires: audit-libs-devel >= 1.1.3, sed >= 3.95, libcap-devel, gettext @@ -1481,6 +1483,9 @@ fi %endif %changelog +* Thu Jun 8 2023 lijianglin - 2.34-124 +- display declaration fstat function, make fstat call the system fstat function + * Sun Jun 4 2023 Qingqing Li - 2.34-123 - x86: add noseparate-code for bash program performance diff --git a/testsuite_whitelist b/testsuite_whitelist index f8d1bee..4017bfe 100644 --- a/testsuite_whitelist +++ b/testsuite_whitelist @@ -135,3 +135,4 @@ locale/tst-localedef-path-norm:loongarch64 misc/tst-glibcsyscalls:loongarch64 # Failed for environment, remove it later. resolv/tst-resolv-res_init-multi:loongarch64 +elf/check-localplt -- Gitee