glibc/glibc-fedora-__libc_multiple_libcs.patch

83 lines
2.5 KiB
Diff
Raw Normal View History

2014-11-24 14:58:08 +00:00
#
# Upstream discussions:
# https://sourceware.org/ml/libc-alpha/2014-02/msg00580.html
#
# Based on the following commit:
#
# From 16552c01a66633c9e412984d9d92616bd4e5303c Mon Sep 17 00:00:00 2001
# From: Andreas Schwab <schwab@redhat.com>
# Date: Fri, 11 Jun 2010 11:04:11 +0200
# Subject: [PATCH] Properly set __libc_multiple_libcs
#
# * elf/rtld.c (_dl_starting_up): Always define.
# (dl_main): Always set _dl_starting_up.
# * elf/dl-support.c (_dl_starting_up): Always define.
# * elf/dl-init.c (_dl_init): Always clear _dl_starting_up.
#
# ---
# ChangeLog | 7 +++++++
# elf/dl-init.c | 4 ----
# elf/dl-support.c | 2 --
# elf/rtld.c | 4 ----
# 4 files changed, 7 insertions(+), 10 deletions(-)
#
Resolves: #1462820 - Drop glibc-Disable-buf-NULL-in-login-tst-ptsname.c, applied upstream. - Auto-sync with upstream master, commit 37e9dc814636915afb88d0779e5e897e90e7b8c0, fixing: - CVE-2017-1000366: Avoid large allocas in the dynamic linker (#1462820) - wait3 namespace (swbz#21625) - S390: Sync ptrace.h with kernel (swbz#21539) - Another x86 sys/ucontext.h namespace issue (swbz#21457) - siginterrupt namespace (swbz#21597) - Signal stack namespace (swbz#21584) - Define struct rusage in sys/wait.h when required (swbz#21575) - S390: Fix build with gcc configured with --enable-default-pie (swbz#21537) - Update timezone code from tzcode 2017b - nptl: Invert the mmap/mprotect logic on allocated stacks (swbz#18988) - PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY - Make copy of <bits/std_abs.h> from GCC (swbz#21573) - localedata: ce_RU: update weekdays from CLDR (swbz#21207) - localedata: Remove trailing spaces (swbz#20275) - XPG4 bsd_signal namespace (swbz#21552) - Correct collation rules for Malayalam (swbz#19922, swbz#19919) - waitid namespace (swbz#21561) - Condition signal.h inclusion in sys/wait.h (swbz#21560) - ld.so: Consolidate 2 strtouls into _dl_strtoul (swbz#21528) - tst-timezone race (swbz#14096) - Define SIG_HOLD for XPG4 (swbz#21538) - struct sigaltstack namespace (swbz#21517) - sigevent namespace (swbz#21543) - Add shim header for bits/syscall.h (swbz#21514) - namespace issues in sys/ucontext.h (swbz#21457) - posix: Implement preadv2 and pwritev2 - Various float128 and tunables improvements
2017-06-19 22:18:02 +00:00
Index: b/elf/dl-init.c
===================================================================
--- a/elf/dl-init.c
+++ b/elf/dl-init.c
@@ -119,8 +119,6 @@ _dl_init (struct link_map *main_map, int
while (i-- > 0)
call_init (main_map->l_initfini[i], argc, argv, env);
-#ifndef HAVE_INLINED_SYSCALLS
/* Finished starting up. */
2014-11-24 14:58:08 +00:00
_dl_starting_up = 0;
-#endif
}
Resolves: #1462820 - Drop glibc-Disable-buf-NULL-in-login-tst-ptsname.c, applied upstream. - Auto-sync with upstream master, commit 37e9dc814636915afb88d0779e5e897e90e7b8c0, fixing: - CVE-2017-1000366: Avoid large allocas in the dynamic linker (#1462820) - wait3 namespace (swbz#21625) - S390: Sync ptrace.h with kernel (swbz#21539) - Another x86 sys/ucontext.h namespace issue (swbz#21457) - siginterrupt namespace (swbz#21597) - Signal stack namespace (swbz#21584) - Define struct rusage in sys/wait.h when required (swbz#21575) - S390: Fix build with gcc configured with --enable-default-pie (swbz#21537) - Update timezone code from tzcode 2017b - nptl: Invert the mmap/mprotect logic on allocated stacks (swbz#18988) - PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY - Make copy of <bits/std_abs.h> from GCC (swbz#21573) - localedata: ce_RU: update weekdays from CLDR (swbz#21207) - localedata: Remove trailing spaces (swbz#20275) - XPG4 bsd_signal namespace (swbz#21552) - Correct collation rules for Malayalam (swbz#19922, swbz#19919) - waitid namespace (swbz#21561) - Condition signal.h inclusion in sys/wait.h (swbz#21560) - ld.so: Consolidate 2 strtouls into _dl_strtoul (swbz#21528) - tst-timezone race (swbz#14096) - Define SIG_HOLD for XPG4 (swbz#21538) - struct sigaltstack namespace (swbz#21517) - sigevent namespace (swbz#21543) - Add shim header for bits/syscall.h (swbz#21514) - namespace issues in sys/ucontext.h (swbz#21457) - posix: Implement preadv2 and pwritev2 - Various float128 and tunables improvements
2017-06-19 22:18:02 +00:00
Index: b/elf/dl-support.c
===================================================================
--- a/elf/dl-support.c
+++ b/elf/dl-support.c
@@ -117,10 +117,8 @@ struct r_scope_elem _dl_initial_searchli
2013-07-09 17:45:48 +00:00
.r_nlist = 1,
};
-#ifndef HAVE_INLINED_SYSCALLS
/* Nonzero during startup. */
int _dl_starting_up = 1;
-#endif
/* Random data provided by the kernel. */
void *_dl_random;
Resolves: #1462820 - Drop glibc-Disable-buf-NULL-in-login-tst-ptsname.c, applied upstream. - Auto-sync with upstream master, commit 37e9dc814636915afb88d0779e5e897e90e7b8c0, fixing: - CVE-2017-1000366: Avoid large allocas in the dynamic linker (#1462820) - wait3 namespace (swbz#21625) - S390: Sync ptrace.h with kernel (swbz#21539) - Another x86 sys/ucontext.h namespace issue (swbz#21457) - siginterrupt namespace (swbz#21597) - Signal stack namespace (swbz#21584) - Define struct rusage in sys/wait.h when required (swbz#21575) - S390: Fix build with gcc configured with --enable-default-pie (swbz#21537) - Update timezone code from tzcode 2017b - nptl: Invert the mmap/mprotect logic on allocated stacks (swbz#18988) - PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY - Make copy of <bits/std_abs.h> from GCC (swbz#21573) - localedata: ce_RU: update weekdays from CLDR (swbz#21207) - localedata: Remove trailing spaces (swbz#20275) - XPG4 bsd_signal namespace (swbz#21552) - Correct collation rules for Malayalam (swbz#19922, swbz#19919) - waitid namespace (swbz#21561) - Condition signal.h inclusion in sys/wait.h (swbz#21560) - ld.so: Consolidate 2 strtouls into _dl_strtoul (swbz#21528) - tst-timezone race (swbz#14096) - Define SIG_HOLD for XPG4 (swbz#21538) - struct sigaltstack namespace (swbz#21517) - sigevent namespace (swbz#21543) - Add shim header for bits/syscall.h (swbz#21514) - namespace issues in sys/ucontext.h (swbz#21457) - posix: Implement preadv2 and pwritev2 - Various float128 and tunables improvements
2017-06-19 22:18:02 +00:00
Index: b/elf/rtld.c
===================================================================
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -214,7 +214,6 @@ audit_list_iter_next (struct audit_list_
return iter->previous->name;
}
-#ifndef HAVE_INLINED_SYSCALLS
/* Set nonzero during loading and initialization of executable and
libraries, cleared before the executable's entry point runs. This
must not be initialized to nonzero, because the unused dynamic
Resolves: #1462820 - Drop glibc-Disable-buf-NULL-in-login-tst-ptsname.c, applied upstream. - Auto-sync with upstream master, commit 37e9dc814636915afb88d0779e5e897e90e7b8c0, fixing: - CVE-2017-1000366: Avoid large allocas in the dynamic linker (#1462820) - wait3 namespace (swbz#21625) - S390: Sync ptrace.h with kernel (swbz#21539) - Another x86 sys/ucontext.h namespace issue (swbz#21457) - siginterrupt namespace (swbz#21597) - Signal stack namespace (swbz#21584) - Define struct rusage in sys/wait.h when required (swbz#21575) - S390: Fix build with gcc configured with --enable-default-pie (swbz#21537) - Update timezone code from tzcode 2017b - nptl: Invert the mmap/mprotect logic on allocated stacks (swbz#18988) - PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY - Make copy of <bits/std_abs.h> from GCC (swbz#21573) - localedata: ce_RU: update weekdays from CLDR (swbz#21207) - localedata: Remove trailing spaces (swbz#20275) - XPG4 bsd_signal namespace (swbz#21552) - Correct collation rules for Malayalam (swbz#19922, swbz#19919) - waitid namespace (swbz#21561) - Condition signal.h inclusion in sys/wait.h (swbz#21560) - ld.so: Consolidate 2 strtouls into _dl_strtoul (swbz#21528) - tst-timezone race (swbz#14096) - Define SIG_HOLD for XPG4 (swbz#21538) - struct sigaltstack namespace (swbz#21517) - sigevent namespace (swbz#21543) - Add shim header for bits/syscall.h (swbz#21514) - namespace issues in sys/ucontext.h (swbz#21457) - posix: Implement preadv2 and pwritev2 - Various float128 and tunables improvements
2017-06-19 22:18:02 +00:00
@@ -224,7 +223,6 @@ audit_list_iter_next (struct audit_list_
never be called. */
int _dl_starting_up = 0;
2014-11-24 14:58:08 +00:00
rtld_hidden_def (_dl_starting_up)
-#endif
/* This is the structure which defines all variables global to ld.so
(except those which cannot be added for some reason). */
Resolves: #1462820 - Drop glibc-Disable-buf-NULL-in-login-tst-ptsname.c, applied upstream. - Auto-sync with upstream master, commit 37e9dc814636915afb88d0779e5e897e90e7b8c0, fixing: - CVE-2017-1000366: Avoid large allocas in the dynamic linker (#1462820) - wait3 namespace (swbz#21625) - S390: Sync ptrace.h with kernel (swbz#21539) - Another x86 sys/ucontext.h namespace issue (swbz#21457) - siginterrupt namespace (swbz#21597) - Signal stack namespace (swbz#21584) - Define struct rusage in sys/wait.h when required (swbz#21575) - S390: Fix build with gcc configured with --enable-default-pie (swbz#21537) - Update timezone code from tzcode 2017b - nptl: Invert the mmap/mprotect logic on allocated stacks (swbz#18988) - PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY - Make copy of <bits/std_abs.h> from GCC (swbz#21573) - localedata: ce_RU: update weekdays from CLDR (swbz#21207) - localedata: Remove trailing spaces (swbz#20275) - XPG4 bsd_signal namespace (swbz#21552) - Correct collation rules for Malayalam (swbz#19922, swbz#19919) - waitid namespace (swbz#21561) - Condition signal.h inclusion in sys/wait.h (swbz#21560) - ld.so: Consolidate 2 strtouls into _dl_strtoul (swbz#21528) - tst-timezone race (swbz#14096) - Define SIG_HOLD for XPG4 (swbz#21538) - struct sigaltstack namespace (swbz#21517) - sigevent namespace (swbz#21543) - Add shim header for bits/syscall.h (swbz#21514) - namespace issues in sys/ucontext.h (swbz#21457) - posix: Implement preadv2 and pwritev2 - Various float128 and tunables improvements
2017-06-19 22:18:02 +00:00
@@ -898,10 +896,8 @@ dl_main (const ElfW(Phdr) *phdr,
/* Process the environment variable which control the behaviour. */
process_envvars (&mode);
-#ifndef HAVE_INLINED_SYSCALLS
/* Set up a flag which tells we are just starting. */
2014-11-24 14:58:08 +00:00
_dl_starting_up = 1;
-#endif
if (*user_entry == (ElfW(Addr)) ENTRY_POINT)
{