From e7570f4131a6af9405af7b4fd1c31de807e7cf68 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 16 Dec 2020 15:09:52 +0100 Subject: Replace __libc_multiple_libcs with __libc_initial flag Change sbrk to fail for !__libc_initial (in the generic implementation). As a result, sbrk is (relatively) safe to use for the __libc_initial case (from the main libc). It is therefore no longer necessary to avoid using it in that case (or updating the brk cache), and the __libc_initial flag does not need to be updated as part of dlmopen or static dlopen. As before, direct brk system calls on Linux may lead to memory corruption. Reviewed-by: Adhemerval Zanella --- sysdeps/mach/hurd/dl-sysdep.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'sysdeps/mach/hurd/dl-sysdep.c') diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c index 370495710e..a5169d85e7 100644 --- a/sysdeps/mach/hurd/dl-sysdep.c +++ b/sysdeps/mach/hurd/dl-sysdep.c @@ -57,8 +57,6 @@ extern char **_environ; int __libc_enable_secure = 0; rtld_hidden_data_def (__libc_enable_secure) -int __libc_multiple_libcs = 0; /* Defining this here avoids the inclusion - of init-first. */ /* This variable contains the lowest stack address ever used. */ void *__libc_stack_end = NULL; rtld_hidden_data_def(__libc_stack_end) -- cgit 1.4.1