diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-01-15 06:38:27 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-01-15 06:38:27 +0000 |
commit | 392a6b52656c1bb40305375b0ea9020455044f9d (patch) | |
tree | 7f1b5fa05ad490bae7df8b3947d6f59f98aa082a /sysdeps | |
parent | cb6ee14a12384563853788c938a86c5354fdea2d (diff) | |
download | glibc-392a6b52656c1bb40305375b0ea9020455044f9d.tar.gz glibc-392a6b52656c1bb40305375b0ea9020455044f9d.tar.xz glibc-392a6b52656c1bb40305375b0ea9020455044f9d.zip |
Update.
2004-01-14 Ulrich Drepper <drepper@redhat.com> * configure.in: Define HAVE_Z_RELRO if the linker supports -z relro. * config.h.in: Add entry for HAVE_Z_RELRO. * include/libc-symbols.h: Define attribute_relro. * elf/dl-load.c: Add attribute_relro to env_path_list, capstr, ncapstr, max_capstrlen, and max_dirnamelen definitions. * elf/rtld.c: Add attribute_relro to _dl_argc, _dl_argv, _dl_skip_args, load_time, start_time, library_path, preloadlist, version_info, any_debug. Remove rtld_total_time. Make it a local variable. Pass pointer to it to print_statistics. Change print_statistics accordingly. * sysdeps/generic/dl-sysdep.c: Add attribute_relro to _dl_auxv. Use attribute_relro instead of explicitly assigning variable to the .data.rel.ro section for __libc_enable_secure and __libc_stack_end. * sysdeps/generic/ldsodefs.h: Declare __libc_stack_end, _dl_argc, _dl_argv, _dl_argv_internal with attribute_relro.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/generic/dl-sysdep.c | 6 | ||||
-rw-r--r-- | sysdeps/generic/ldsodefs.h | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sysdeps/generic/dl-sysdep.c b/sysdeps/generic/dl-sysdep.c index fd528eb01f..704dbdb432 100644 --- a/sysdeps/generic/dl-sysdep.c +++ b/sysdeps/generic/dl-sysdep.c @@ -48,14 +48,14 @@ extern void __libc_check_standard_fds (void); #ifdef NEED_DL_BASE_ADDR ElfW(Addr) _dl_base_addr; #endif -int __libc_enable_secure __attribute__ ((section (".data.rel.ro"))) = 0; +int __libc_enable_secure attribute_relro = 0; INTVARDEF(__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. */ -void *__libc_stack_end __attribute__ ((section (".data.rel.ro"))); +void *__libc_stack_end attribute_relro; rtld_hidden_data_def(__libc_stack_end) -static ElfW(auxv_t) *_dl_auxv; +static ElfW(auxv_t) *_dl_auxv attribute_relro; #ifndef DL_FIND_ARG_COMPONENTS # define DL_FIND_ARG_COMPONENTS(cookie, argc, argv, envp, auxp) \ diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index f511c5d36f..a05e5c76d4 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -461,14 +461,14 @@ rtld_hidden_proto (_dl_make_stack_executable) might use the variable which results in copy relocations on some platforms. But this does not matter, ld.so can always use the local copy. */ -extern void *__libc_stack_end; +extern void *__libc_stack_end attribute_relro; rtld_hidden_proto (__libc_stack_end) /* Parameters passed to the dynamic linker. */ -extern int _dl_argc attribute_hidden; -extern char **_dl_argv; +extern int _dl_argc attribute_hidden attribute_relro; +extern char **_dl_argv attribute_relro; #ifdef IS_IN_rtld -extern char **_dl_argv_internal attribute_hidden; +extern char **_dl_argv_internal attribute_hidden attribute_relro; # define rtld_progname (INTUSE(_dl_argv)[0]) #else # define rtld_progname _dl_argv[0] |