aboutsummaryrefslogtreecommitdiff
path: root/elf/rtld.c
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2022-05-03 17:01:44 +0100
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2022-05-17 10:14:03 +0100
commit86147bbeec25624cb26bb7646cdbc3a49bc56bf5 (patch)
tree5d8052a0813836943eafd49956304bf98288e1d2 /elf/rtld.c
parentad43cac44a6860eaefcadadfb2acb349921e96bf (diff)
downloadglibc-86147bbeec25624cb26bb7646cdbc3a49bc56bf5.zip
glibc-86147bbeec25624cb26bb7646cdbc3a49bc56bf5.tar.gz
glibc-86147bbeec25624cb26bb7646cdbc3a49bc56bf5.tar.bz2
rtld: Remove DL_ARGV_NOT_RELRO and make _dl_skip_args const
_dl_skip_args is always 0, so the target specific code that modifies argv after relro protection is applied is no longer used. After the patch relro protection is applied to _dl_argv consistently on all targets. Reviewed-by: Florian Weimer <fweimer@redhat.com> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'elf/rtld.c')
-rw-r--r--elf/rtld.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/elf/rtld.c b/elf/rtld.c
index 6e8ed43..069940d 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -156,16 +156,10 @@ static void dl_main_state_init (struct dl_main_state *state);
extern char **_environ attribute_hidden;
static void process_envvars (struct dl_main_state *state);
-#ifdef DL_ARGV_NOT_RELRO
-int _dl_argc attribute_hidden;
-char **_dl_argv = NULL;
-/* Nonzero if we were run directly. */
-unsigned int _dl_skip_args attribute_hidden;
-#else
int _dl_argc attribute_relro attribute_hidden;
char **_dl_argv attribute_relro = NULL;
-unsigned int _dl_skip_args attribute_relro attribute_hidden;
-#endif
+/* Always 0, only kept for not-yet-updated target start code. */
+const unsigned int _dl_skip_args attribute_hidden;
rtld_hidden_data_def (_dl_argv)
#ifndef THREAD_SET_STACK_GUARD