about summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-01-09 20:23:44 +0000
committerUlrich Drepper <drepper@redhat.com>2005-01-09 20:23:44 +0000
commit9fbdeb410d7d7e7383b20b71da4dd4bd481a8808 (patch)
tree234bd8367c8199b96e4cb369a119ad5e42bc5f1b /elf
parent217fc747ff8ce46df736f0b975d7082753219391 (diff)
downloadglibc-9fbdeb410d7d7e7383b20b71da4dd4bd481a8808.tar.gz
glibc-9fbdeb410d7d7e7383b20b71da4dd4bd481a8808.tar.xz
glibc-9fbdeb410d7d7e7383b20b71da4dd4bd481a8808.zip
Update.
	* elf/dl-runtime.c: Inlcude <sys/param.h>.

	* elf/Makefile (headers): Add bits/link.h.

2005-01-09  Andreas Schwab  <schwab@suse.de>

	* elf/rtld.c (dl_main): Create main_map with __RTLD_OPENEXEC.

2005-01-09  Andreas Jaeger  <aj@suse.de>

	* time/strptime_l.c (__strptime_internal): Add braces to avoid
	warning.

	* sysdeps/x86_64/bits/link.h: Use vector_size for GCC 4.0.

	* elf/rtld.c (dl_main): Call _dl_add_to_slotinfo only if USE_TLS.

2005-01-08  Jakub Jelinek  <jakub@redhat.com>

	* elf/Makefile (generated): Add tst-pie1{,.out,.o}.

2005-01-09  Ulrich Drepper  <drepper@redhat.com>
Diffstat (limited to 'elf')
-rw-r--r--elf/Makefile2
-rw-r--r--elf/dl-runtime.c1
-rw-r--r--elf/rtld.c8
3 files changed, 8 insertions, 3 deletions
diff --git a/elf/Makefile b/elf/Makefile
index ddc20f4059..0983d6c42e 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -20,7 +20,7 @@
 
 subdir		:= elf
 
-headers		= elf.h bits/elfclass.h link.h
+headers		= elf.h bits/elfclass.h link.h bits/link.h
 routines	= $(dl-routines) dl-support dl-iteratephdr \
 		  dl-addr enbl-secure dl-profstub \
 		  dl-origin dl-libc dl-sym dl-tsd
diff --git a/elf/dl-runtime.c b/elf/dl-runtime.c
index 0fa8d55a17..ab177b826a 100644
--- a/elf/dl-runtime.c
+++ b/elf/dl-runtime.c
@@ -22,6 +22,7 @@
 #include <alloca.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include <sys/param.h>
 #include <ldsodefs.h>
 #include "dynamic-link.h"
 
diff --git a/elf/rtld.c b/elf/rtld.c
index 77903bfd09..f1246899f8 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -995,8 +995,8 @@ of this helper program; chances are you did not intend to run this program.\n\
     {
       /* Create a link_map for the executable itself.
 	 This will be what dlopen on "" returns.  */
-      main_map
-	= _dl_new_object ((char *) "", "", lt_executable, NULL, 0, LM_ID_BASE);
+      main_map = _dl_new_object ((char *) "", "", lt_executable, NULL,
+				 __RTLD_OPENEXEC, LM_ID_BASE);
       assert (main_map != NULL);
       assert (main_map == GL(dl_ns)[LM_ID_BASE]._ns_loaded);
       main_map->l_phdr = phdr;
@@ -2117,9 +2117,11 @@ ERROR: ld.so: object '%s' from %s cannot be preloaded: ignored.\n",
 	  if (l->l_relro_size)
 	    _dl_protect_relro (l);
 
+#ifdef USE_TLS
 	  /* Add object to slot information data if necessasy.  */
 	  if (l->l_tls_blocksize != 0 && tls_init_tp_called)
 	    _dl_add_to_slotinfo (l);
+#endif
 	}
 
       _dl_sysdep_start_cleanup ();
@@ -2167,9 +2169,11 @@ ERROR: ld.so: object '%s' from %s cannot be preloaded: ignored.\n",
 	    _dl_relocate_object (l, l->l_scope, GLRO(dl_lazy),
 				 consider_profiling);
 
+#ifdef USE_TLS
 	  /* Add object to slot information data if necessasy.  */
 	  if (l->l_tls_blocksize != 0 && tls_init_tp_called)
 	    _dl_add_to_slotinfo (l);
+#endif
 
 	  l = l->l_prev;
 	}