about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2003-07-29 08:57:15 +0000
committerRoland McGrath <roland@gnu.org>2003-07-29 08:57:15 +0000
commit172ce013bdd864ba22b6b22611ffd893f1f9f2a6 (patch)
tree8d147bf8e002c5dd3a2aa6a9c1a13a9b0a5bd460
parent5181d776e8bb3c277ea291b3b43be0ce8a38c6c3 (diff)
downloadglibc-172ce013bdd864ba22b6b22611ffd893f1f9f2a6.tar.gz
glibc-172ce013bdd864ba22b6b22611ffd893f1f9f2a6.tar.xz
glibc-172ce013bdd864ba22b6b22611ffd893f1f9f2a6.zip
* elf/dl-support.c (_dl_hwcap): Add nocommon attribute.
-rw-r--r--ChangeLog4
-rw-r--r--elf/dl-support.c23
-rw-r--r--linuxthreads/ChangeLog8
-rw-r--r--nptl/ChangeLog4
4 files changed, 37 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 75e577f252..35ac3d8ef4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2003-07-25  Jakub Jelinek  <jakub@redhat.com>
+
+	* elf/dl-support.c (_dl_hwcap): Add nocommon attribute.
+
 2003-07-29  Roland McGrath  <roland@redhat.com>
 
 	* elf/Makefile (tests) [$(build-shared) = yes]:
diff --git a/elf/dl-support.c b/elf/dl-support.c
index 1616eec2f4..6a02e4ea1f 100644
--- a/elf/dl-support.c
+++ b/elf/dl-support.c
@@ -121,9 +121,19 @@ int _dl_debug_fd = STDERR_FILENO;
 
 int _dl_correct_cache_id = _DL_CACHE_DEFAULT_ID;
 
-struct ElfW(Phdr) *_dl_phdr;
+ElfW(Phdr) *_dl_phdr;
 size_t _dl_phnum;
-unsigned long int _dl_hwcap;
+unsigned long int _dl_hwcap __attribute__ ((nocommon));
+
+/* Prevailing state of the stack, PF_X indicating it's executable.  */
+ElfW(Word) _dl_stack_flags = PF_R|PF_W|PF_X;
+
+/* If loading a shared object requires that we make the stack executable
+   when it was not, we do it by calling this function.
+   It returns an errno code or zero on success.  */
+int (*_dl_make_stack_executable_hook) (void) internal_function
+  = _dl_make_stack_executable;
+
 
 #ifdef NEED_DL_SYSINFO
 /* Needed for improved syscall handling on at least x86/Linux.  */
@@ -260,6 +270,15 @@ _dl_non_dynamic_init (void)
   /* Now determine the length of the platform string.  */
   if (_dl_platform != NULL)
     _dl_platformlen = strlen (_dl_platform);
+
+  /* Scan for a program header telling us the stack is nonexecutable.  */
+  if (_dl_phdr != NULL)
+    for (uint_fast16_t i = 0; i < _dl_phnum; ++i)
+      if (_dl_phdr[i].p_type == PT_GNU_STACK)
+	{
+	  _dl_stack_flags = _dl_phdr[i].p_flags;
+	  break;
+	}
 }
 
 
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index ca31927b61..4d70bb326c 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,11 @@
+2003-07-29  Roland McGrath  <roland@redhat.com>
+
+	* Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
+
+2003-07-25  Roland McGrath  <roland@redhat.com>
+
+	* manager.c (pthread_start_thread): Fix typo in last change.
+
 2003-07-14  Guido Guenther  <agx@sigxcpu.org>
 
 	* sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Add IS_IN_librt,
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 0f6bea50e2..145c719589 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,7 @@
+2003-07-29  Roland McGrath  <roland@redhat.com>
+
+	* Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
+
 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
 
 	* tst-cancel17.c (do_test): Check if aio_cancel failed.