From 6bc6bd3b10e6c2fd4c656647aa643919b0519825 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 10 Oct 2014 11:13:11 +0000 Subject: Don't use INTVARDEF/INTUSE with __libc_enable_secure (bug 14132). Continuing the removal of the obsolete INTDEF / INTVARDEF / INTUSE mechanism, this patch replaces its use for __libc_enable_secure with the use of rtld_hidden_data_def and rtld_hidden_proto. Tested for x86_64 that installed stripped shared libraries are unchanged by the patch. [BZ #14132] * elf/dl-sysdep.c (__libc_enable_secure): Use rtld_hidden_data_def instead of INTVARDEF. (_dl_sysdep_start): Do not use INTUSE with __libc_enable_secure. * sysdeps/mach/hurd/dl-sysdep.c (__libc_enable_secure): Use rtld_hidden_data_def instead of INTVARDEF. (_dl_sysdep_start): Do not use INTUSE with __libc_enable_secure. * elf/dl-deps.c (expand_dst): Likewise. * elf/dl-load.c (_dl_dst_count): Likewise. (_dl_dst_substitute): Likewise. (decompose_rpath): Likewise. (_dl_init_paths): Likewise. (open_path): Likewise. (_dl_map_object): Likewise. * elf/rtld.c (dl_main): Likewise. (process_dl_audit): Likewise. (process_envvars): Likewise. * include/unistd.h [IS_IN_rtld] (__libc_enable_secure_internal): Remove declaration. (__libc_enable_secure): Use rtld_hidden_proto. --- sysdeps/mach/hurd/dl-sysdep.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sysdeps/mach') diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c index 7f79d1a415..5de385744b 100644 --- a/sysdeps/mach/hurd/dl-sysdep.c +++ b/sysdeps/mach/hurd/dl-sysdep.c @@ -51,7 +51,7 @@ extern char **_dl_argv; extern char **_environ; int __libc_enable_secure = 0; -INTVARDEF(__libc_enable_secure) +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. */ @@ -140,7 +140,7 @@ _dl_sysdep_start (void **start_argptr, else _dl_hurd_data = (void *) p; - INTUSE(__libc_enable_secure) = _dl_hurd_data->flags & EXEC_SECURE; + __libc_enable_secure = _dl_hurd_data->flags & EXEC_SECURE; if (_dl_hurd_data->flags & EXEC_STACK_ARGS && _dl_hurd_data->user_entry == 0) @@ -220,7 +220,7 @@ unfmh(); /* XXX */ environment list. We use memmove, since the locations might overlap. */ - if (INTUSE(__libc_enable_secure) || _dl_skip_args) + if (__libc_enable_secure || _dl_skip_args) { char **newp; -- cgit 1.4.1