From d20db0561a6a36f914fde030512503b114ef9a0c Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Sat, 3 Aug 2024 06:28:41 +0000 Subject: automatic import of glibc --- ...eep-compatible-with-the-original-policy-o.patch | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 0002-elf-ld.so-keep-compatible-with-the-original-policy-o.patch (limited to '0002-elf-ld.so-keep-compatible-with-the-original-policy-o.patch') diff --git a/0002-elf-ld.so-keep-compatible-with-the-original-policy-o.patch b/0002-elf-ld.so-keep-compatible-with-the-original-policy-o.patch new file mode 100644 index 0000000..ea95478 --- /dev/null +++ b/0002-elf-ld.so-keep-compatible-with-the-original-policy-o.patch @@ -0,0 +1,34 @@ +From 2ace2eddbd6a0cda2006e632444cd19a360d12d4 Mon Sep 17 00:00:00 2001 +From: Lv Ying +Date: Fri, 24 Feb 2023 16:14:42 +0800 +Subject: [PATCH 2/3] elf/ld.so: keep compatible with the original policy of + the LD_HUGEPAGE_LIB env + +When we use new policy: ld.so load PT_LOAD segement use hugepage according to +PF_HUGEPAGE flag. We should keep compatible with the original policy of +the LD_HUGEPAGE_LIB env which loads all the PT_LOAD segment try to use +hugepage. + +Signed-off-by: Lv Ying +--- + elf/dl-load.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/elf/dl-load.c b/elf/dl-load.c +index e0d4fa2e..e01bb448 100644 +--- a/elf/dl-load.c ++++ b/elf/dl-load.c +@@ -1184,7 +1184,9 @@ _dl_map_object_from_fd (const char *name, const char *origname, int fd, + } + + #ifdef HUGEPAGE_SHARED_LIB +- if (ph->p_flags & PF_HUGEPAGE) { ++ if (GLRO(dl_hugepage_mask) & DL_HUGEPAGE_LIB_LARGE_IN_FLAG) { ++ hp_bitmap[nloadcmds] = 1; ++ } else if (ph->p_flags & PF_HUGEPAGE) { + hp_bitmap[nloadcmds] = 1; + use_hugepage = true; + } else +-- +2.38.1 + -- cgit v1.2.3