aboutsummaryrefslogtreecommitdiff
path: root/elf/rtld.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-02-21 13:52:20 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-05-16 15:03:49 -0300
commitd2db60d8d830ef68c8d20a77ac3572d610aa40b1 (patch)
treefdf43a50152db7e52afc4ec38516a3ff2d163c67 /elf/rtld.c
parentc628c2296392ed3bf2cb8d8470668e64fe53389f (diff)
downloadglibc-d2db60d8d830ef68c8d20a77ac3572d610aa40b1.zip
glibc-d2db60d8d830ef68c8d20a77ac3572d610aa40b1.tar.gz
glibc-d2db60d8d830ef68c8d20a77ac3572d610aa40b1.tar.bz2
Remove dl-librecon.h header.
The Linux version used by i686 and m68k provide three overrrides for generic code: 1. DISTINGUISH_LIB_VERSIONS to print additional information when libc5 is used by a dependency. 2. EXTRA_LD_ENVVARS to that enabled LD_LIBRARY_VERSION environment variable. 3. EXTRA_UNSECURE_ENVVARS to add two environment variables related to aout support. None are really requires, it has some decades since libc5 or aout suppported was removed and Linux even remove support for aout files. The LD_LIBRARY_VERSION is also dead code, dl_correct_cache_id is not used anywhere. Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: Florian Weimer <fweimer@redhat.com>
Diffstat (limited to 'elf/rtld.c')
-rw-r--r--elf/rtld.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/elf/rtld.c b/elf/rtld.c
index a8cf9da..578fc14 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -32,7 +32,6 @@
#include <fpu_control.h>
#include <hp-timing.h>
#include <libc-lock.h>
-#include <dl-librecon.h>
#include <unsecvars.h>
#include <dl-cache.h>
#include <dl-osinfo.h>
@@ -365,7 +364,6 @@ struct rtld_global_ro _rtld_global_ro attribute_relro =
._dl_sysinfo = DL_SYSINFO_DEFAULT,
#endif
._dl_debug_fd = STDERR_FILENO,
- ._dl_correct_cache_id = _DL_CACHE_DEFAULT_ID,
#if !HAVE_TUNABLES
._dl_hwcap_mask = HWCAP_IMPORTANT,
#endif
@@ -1692,10 +1690,6 @@ dl_main (const ElfW(Phdr) *phdr,
if (main_map->l_ld == NULL)
_exit (1);
- /* We allow here some platform specific code. */
-#ifdef DISTINGUISH_LIB_VERSIONS
- DISTINGUISH_LIB_VERSIONS;
-#endif
_exit (has_interp ? 0 : 2);
}
@@ -2648,29 +2642,14 @@ process_envvars (struct dl_main_state *state)
= _dl_strtoul (&envline[21], NULL) > 1;
}
break;
-
- /* We might have some extra environment variable to handle. This
- is tricky due to the pre-processing of the length of the name
- in the switch statement here. The code here assumes that added
- environment variables have a different length. */
-#ifdef EXTRA_LD_ENVVARS
- EXTRA_LD_ENVVARS
-#endif
}
}
/* Extra security for SUID binaries. Remove all dangerous environment
variables. */
- if (__builtin_expect (__libc_enable_secure, 0))
+ if (__glibc_unlikely (__libc_enable_secure))
{
- static const char unsecure_envvars[] =
-#ifdef EXTRA_UNSECURE_ENVVARS
- EXTRA_UNSECURE_ENVVARS
-#endif
- UNSECURE_ENVVARS;
- const char *nextp;
-
- nextp = unsecure_envvars;
+ const char *nextp = UNSECURE_ENVVARS;
do
{
unsetenv (nextp);