8c25df8a1d
Upstream commit: 0f09154c64005e78b61484ae87b5ea2028051ea0 - x86: Initialize CPU info via IFUNC relocation [BZ 26203] - Add NEWS entry for ftime compatibility move - support: Add create_temp_file_in_dir - linux: Add __readdir_unlocked - linux: Simplify opendir buffer allocation - linux: Move posix dir implementations to Linux - linux: Add 64-bit time_t support for wait3 - Move ftime to a compatibility symbol - linux: Fix time64 support for futimesat - linux: Use INTERNAL_SYSCALL on fstatat{64} - shm tests: Append PID to names passed to shm_open [BZ #26737] - sysvipc: Fix tst-sysvshm-linux on x32 - x86/CET: Update vfork to prevent child return - resolv: Serialize processing in resolv/tst-resolv-txnid-collision - statfs: add missing f_flags assignment - y2038: Remove not used __fstatat_time64 define - y2038: nptl: Convert pthread_mutex_{clock|timed}lock to support 64 bit - sysvipc: Return EINVAL for invalid shmctl commands - sysvipc: Fix IPC_INFO and SHM_INFO handling [BZ #26636] - AArch64: Use __memcpy_simd on Neoverse N2/V1 - resolv: Handle transaction ID collisions in parallel queries (bug 26600) - support: Provide a way to clear the RA bit in DNS server responses - support: Provide a way to reorder responses within the DNS test server - Add missing stat/mknod symbol on libc.abilist some ABIs - manual: correct the spelling of "MALLOC_PERTURB_" [BZ #23015] - manual: replace an obsolete collation example with a valid one - rtld: fix typo in comment - elf: Add missing <dl-procinfo.h> header to elf/dl-usage.c - hurd: support clock_gettime(CLOCK_PROCESS/THREAD_CPUTIME_ID) - linux: Move xmknod{at} to compat symbols - linux: Add {f}stat{at} y2038 support - linux: Move {f}xstat{at} to compat symbols - linux: Disentangle fstatat from fxstatat - linux: Implement {l}fstat{at} in terms of fstatat - linux: Move the struct stat{64} to struct_stat.h - Remove mknod wrapper functions, move them to symbols - Remove stat wrapper functions, move them to exported symbols - <sys/platform/x86.h>: Add FSRCS/FSRS/FZLRM support - <sys/platform/x86.h>: Add Intel HRESET support - <sys/platform/x86.h>: Add AVX-VNNI support - <sys/platform/x86.h>: Add AVX512_FP16 support - <sys/platform/x86.h>: Add Intel UINTR support - elf: Do not pass GLRO(dl_platform), GLRO(dl_platformlen) to _dl_important_hwcaps - elf: Enhance ld.so --help to print HWCAP subdirectories - elf: Add library search path information to ld.so --help - sunrpc: Adjust RPC function declarations to match Sun's (bug 26686] - Avoid GCC 11 -Warray-parameter warnings [BZ #26686]. - elf: Make __rtld_env_path_list and __rtld_search_dirs global variables - elf: Print the full name of the dynamic loader in the ld.so help message - elf: Use the term "program interpreter" in the ld.so help message - scripts/update-copyrights: Update csu/version.c, elf/dl-usage.c - elf: Implement ld.so --version - nptl: Add missing cancellation flags on lockf - Update mips64 libm-test-ulps - Update alpha libm-test-ulps - elf: Implement ld.so --help - elf: Record whether paths come from LD_LIBRARY_PATH or --library-path - elf: Move ld.so error/help output to _dl_usage - elf: Extract command-line/environment variables state from rtld.c
92 lines
3.0 KiB
Diff
92 lines
3.0 KiB
Diff
Short description: Cleanup use of _dl_starting_up.
|
|
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
|
|
Origin: PATCH
|
|
Upstream status: https://sourceware.org/ml/libc-alpha/2014-02/msg00589.html
|
|
|
|
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(-)
|
|
~~~
|
|
|
|
This patch needs to go upstream to get cleaned up, but has always involed
|
|
analysis of the GNU/Hurd parts of the change and that stalled out, but
|
|
perhaps with build-many-glibcs we can now test these changes more easily.
|
|
|
|
diff --git a/elf/dl-init.c b/elf/dl-init.c
|
|
index 518824e8a5826314..66c395474a57c1fd 100644
|
|
--- a/elf/dl-init.c
|
|
+++ b/elf/dl-init.c
|
|
@@ -120,8 +120,6 @@ _dl_init (struct link_map *main_map, int argc, char **argv, char **env)
|
|
while (i-- > 0)
|
|
call_init (main_map->l_initfini[i], argc, argv, env);
|
|
|
|
-#ifndef HAVE_INLINED_SYSCALLS
|
|
/* Finished starting up. */
|
|
_dl_starting_up = 0;
|
|
-#endif
|
|
}
|
|
diff --git a/elf/dl-support.c b/elf/dl-support.c
|
|
index afbc94df5435a7d7..e894f98e97641cef 100644
|
|
--- a/elf/dl-support.c
|
|
+++ b/elf/dl-support.c
|
|
@@ -120,10 +120,8 @@ struct r_scope_elem _dl_initial_searchlist =
|
|
.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;
|
|
diff --git a/elf/rtld.c b/elf/rtld.c
|
|
index 5d117d0d2c5902c1..3c4bb5605234409d 100644
|
|
--- a/elf/rtld.c
|
|
+++ b/elf/rtld.c
|
|
@@ -294,7 +294,6 @@ dl_main_state_init (struct dl_main_state *state)
|
|
state->version_info = false;
|
|
}
|
|
|
|
-#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
|
|
@@ -304,7 +303,6 @@ dl_main_state_init (struct dl_main_state *state)
|
|
never be called. */
|
|
int _dl_starting_up = 0;
|
|
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). */
|
|
@@ -1146,10 +1144,8 @@ dl_main (const ElfW(Phdr) *phdr,
|
|
/* Process the environment variable which control the behaviour. */
|
|
process_envvars (&state);
|
|
|
|
-#ifndef HAVE_INLINED_SYSCALLS
|
|
/* Set up a flag which tells we are just starting. */
|
|
_dl_starting_up = 1;
|
|
-#endif
|
|
|
|
const char *ld_so_name = _dl_argv[0];
|
|
if (*user_entry == (ElfW(Addr)) ENTRY_POINT)
|