about summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-01-15 06:38:27 +0000
committerUlrich Drepper <drepper@redhat.com>2004-01-15 06:38:27 +0000
commit392a6b52656c1bb40305375b0ea9020455044f9d (patch)
tree7f1b5fa05ad490bae7df8b3947d6f59f98aa082a /include
parentcb6ee14a12384563853788c938a86c5354fdea2d (diff)
downloadglibc-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 'include')
-rw-r--r--include/libc-symbols.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index bb4947304b..d14f26c73d 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -1,6 +1,6 @@
 /* Support macros for making weak and strong aliases for symbols,
    and for using symbol sets and linker warnings with GNU ld.
-   Copyright (C) 1995-1998,2000,2001,2002,2003 Free Software Foundation, Inc.
+   Copyright (C) 1995-1998,2000-2003,2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -458,12 +458,18 @@ for linking")
 # define attribute_hidden
 #endif
 
-#if defined HAVE_TLS_MODEL_ATTRIBUTE
+#ifdef HAVE_TLS_MODEL_ATTRIBUTE
 # define attribute_tls_model_ie __attribute__ ((tls_model ("initial-exec")))
 #else
 # define attribute_tls_model_ie
 #endif
 
+#ifdef HAVE_Z_RELRO
+# define attribute_relro __attribute__ ((section (".data.rel.ro")))
+#else
+# define attribute_relro
+#endif
+
 /* Handling on non-exported internal names.  We have to do this only
    for shared code.  */
 #ifdef SHARED