about summary refs log tree commit diff
path: root/sysdeps/generic/ldsodefs.h
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 /sysdeps/generic/ldsodefs.h
parentad43cac44a6860eaefcadadfb2acb349921e96bf (diff)
downloadglibc-86147bbeec25624cb26bb7646cdbc3a49bc56bf5.tar.gz
glibc-86147bbeec25624cb26bb7646cdbc3a49bc56bf5.tar.xz
glibc-86147bbeec25624cb26bb7646cdbc3a49bc56bf5.zip
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 'sysdeps/generic/ldsodefs.h')
-rw-r--r--sysdeps/generic/ldsodefs.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index b69ea2caeb..6716e1f382 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -753,18 +753,11 @@ rtld_hidden_proto (__libc_stack_end)
 
 /* Parameters passed to the dynamic linker.  */
 extern int _dl_argc attribute_hidden attribute_relro;
-extern char **_dl_argv
-#ifndef DL_ARGV_NOT_RELRO
-     attribute_relro
-#endif
-     ;
+extern char **_dl_argv attribute_relro;
 rtld_hidden_proto (_dl_argv)
 #if IS_IN (rtld)
-extern unsigned int _dl_skip_args attribute_hidden
-# ifndef DL_ARGV_NOT_RELRO
-     attribute_relro
-# endif
-     ;
+/* Always 0, only kept for not-yet-updated target start code.  */
+extern const unsigned int _dl_skip_args attribute_hidden;
 #endif
 #define rtld_progname _dl_argv[0]