about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2004-09-22 21:27:23 +0000
committerRoland McGrath <roland@gnu.org>2004-09-22 21:27:23 +0000
commit59ae4124b7029b712c0cc513f570be0bf10dcd06 (patch)
tree05261955ad494d835d3963687fb4419996b7c45f
parentee414d57cfe8222f920662d5288c295a503e9970 (diff)
downloadglibc-59ae4124b7029b712c0cc513f570be0bf10dcd06.tar.gz
glibc-59ae4124b7029b712c0cc513f570be0bf10dcd06.tar.xz
glibc-59ae4124b7029b712c0cc513f570be0bf10dcd06.zip
Patches migrated from cvs.devel.redhat.com:/cvs/devel/glibc
-rw-r--r--fedora/glibc-execstack-disable.patch65
-rw-r--r--fedora/glibc-ia64-lib64.patch92
-rw-r--r--fedora/glibc-nptl-check.patch48
-rw-r--r--fedora/glibc-ppc-assume.patch18
4 files changed, 223 insertions, 0 deletions
diff --git a/fedora/glibc-execstack-disable.patch b/fedora/glibc-execstack-disable.patch
new file mode 100644
index 0000000000..dc0663635f
--- /dev/null
+++ b/fedora/glibc-execstack-disable.patch
@@ -0,0 +1,65 @@
+--- libc/config.make.in.jj	Wed Sep 24 05:39:06 2003
++++ libc/config.make.in	Wed Sep 24 17:03:11 2003
+@@ -42,7 +42,7 @@ have-z-nodelete = @libc_cv_z_nodelete@
+ have-z-nodlopen = @libc_cv_z_nodlopen@
+ have-z-initfirst = @libc_cv_z_initfirst@
+ have-z-combreloc = @libc_cv_z_combreloc@
+-have-z-execstack = @libc_cv_z_execstack@
++have-z-execstack = no
+ have-initfini = @libc_cv_have_initfini@
+ have-Bgroup = @libc_cv_Bgroup@
+ need-nopic-initfini = @nopic_initfini@
+--- libc/linuxthreads/sysdeps/unix/sysv/linux/dl-execstack.c.jj	Thu Apr 11 10:25:15 2002
++++ libc/linuxthreads/sysdeps/unix/sysv/linux/dl-execstack.c	Wed Sep 24 17:45:40 2003
+@@ -0,0 +1 @@
++#include <sysdeps/generic/dl-execstack.c>
+--- libc/elf/rtld.c.jj	Wed Sep 24 05:39:07 2003
++++ libc/elf/rtld.c	Wed Sep 24 17:52:43 2003
+@@ -764,6 +764,7 @@ of this helper program; chances are you 
+ 	 load the program below unless it has a PT_GNU_STACK indicating
+ 	 nonexecutable stack is ok.  */
+ 
++      if (0)
+       for (ph = phdr; ph < &phdr[phnum]; ++ph)
+ 	if (ph->p_type == PT_GNU_STACK)
+ 	  {
+@@ -929,7 +930,7 @@ of this helper program; chances are you 
+ 	break;
+ #endif
+       case PT_GNU_STACK:
+-	GL(dl_stack_flags) = ph->p_flags;
++//	GL(dl_stack_flags) = ph->p_flags;
+ 	break;
+       }
+ #ifdef USE_TLS
+--- libc/elf/dl-support.c.jj	Wed Sep 24 06:22:50 2003
++++ libc/elf/dl-support.c	Wed Sep 24 17:54:05 2003
+@@ -281,7 +281,7 @@ _dl_non_dynamic_init (void)
+ #endif
+ 
+   /* Scan for a program header telling us the stack is nonexecutable.  */
+-  if (_dl_phdr != NULL)
++  if (0 && _dl_phdr != NULL)
+     for (uint_fast16_t i = 0; i < _dl_phnum; ++i)
+       if (_dl_phdr[i].p_type == PT_GNU_STACK)
+ 	{
+--- libc/elf/dl-load.c.jj	2003-09-24 05:34:10.000000000 -0400
++++ libc/elf/dl-load.c	2003-09-24 18:10:41.000000000 -0400
+@@ -1063,7 +1063,7 @@ cannot allocate TLS data structures for 
+ 	  break;
+ 
+ 	case PT_GNU_STACK:
+-	  stack_flags = ph->p_flags;
++//	  stack_flags = ph->p_flags;
+ 	  break;
+ 	}
+ 
+@@ -1341,7 +1341,7 @@ cannot allocate TLS data structures for 
+   l->l_dev = st.st_dev;
+   l->l_ino = st.st_ino;
+ 
+-  if (__builtin_expect ((stack_flags &~ GL(dl_stack_flags)) & PF_X, 0))
++  if (0 && __builtin_expect ((stack_flags &~ GL(dl_stack_flags)) & PF_X, 0))
+     {
+       /* The stack is presently not executable, but this module
+ 	 requires that it be executable.  */
diff --git a/fedora/glibc-ia64-lib64.patch b/fedora/glibc-ia64-lib64.patch
new file mode 100644
index 0000000000..05fd922969
--- /dev/null
+++ b/fedora/glibc-ia64-lib64.patch
@@ -0,0 +1,92 @@
+2004-05-14  Jakub Jelinek  <jakub@redhat.com>
+
+	* sysdeps/unix/sysv/linux/configure.in: Use */lib64 even for ia64.
+	* sysdeps/unix/sysv/linux/configure: Rebuilt.
+	* sysdeps/unix/sysv/linux/ia64/dl-procinfo.c: New file.
+	* sysdeps/unix/sysv/linux/ia64/dl-procinfo.h: New file.
+	* sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed: Change /lib64/ld*
+	into /lib/ld*.  Add LD_LIBRARY_VERSION.
+	* sysdeps/unix/sysv/linux/ia64/ldconfig.h
+	(SYSDEP_KNOWN_INTERPRETER_NAMES): Add /lib64/ld-linux-ia64.so.2.
+	* sysdeps/unix/sysv/linux/ia64/dl-cache.h: Include sparc-linux
+	dl-cache.h instead of generic dl-cache.h.
+
+--- libc/sysdeps/unix/sysv/linux/configure.jj	2003-03-23 03:10:04.000000000 +0100
++++ libc/sysdeps/unix/sysv/linux/configure	2004-05-14 15:54:35.669802684 +0200
+@@ -225,7 +225,7 @@ case "$prefix" in
+   # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib
+   case $machine in
+   sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64 | \
+-  mips/mips64/n64/* )
++  mips/mips64/n64/* | ia64 )
+     libc_cv_slibdir="/lib64"
+     if test "$libdir" = '${exec_prefix}/lib'; then
+       libdir='${exec_prefix}/lib64';
+--- libc/sysdeps/unix/sysv/linux/configure.in.jj	2003-03-23 03:10:04.000000000 +0100
++++ libc/sysdeps/unix/sysv/linux/configure.in	2004-05-14 15:53:44.355998785 +0200
+@@ -158,7 +158,7 @@ case "$prefix" in
+   # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib
+   case $machine in
+   sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64 | \
+-  mips/mips64/n64/* )
++  mips/mips64/n64/* | ia64 )
+     libc_cv_slibdir="/lib64"
+     if test "$libdir" = '${exec_prefix}/lib'; then
+       libdir='${exec_prefix}/lib64';
+--- libc/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c.jj	2004-05-14 15:42:09.307560515 +0200
++++ libc/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c	2003-09-30 00:23:24.000000000 +0200
+@@ -0,0 +1,5 @@
++#ifdef IS_IN_ldconfig
++#include <sysdeps/i386/dl-procinfo.c>
++#else
++#include <sysdeps/generic/dl-procinfo.c>
++#endif
+--- libc/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed.jj	2002-01-17 07:49:28.000000000 +0100
++++ libc/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed	2004-05-14 16:21:03.041325040 +0200
+@@ -1 +1,4 @@
+-s_^\(RTLDLIST=\)\([^ 	]*\)-ia64\(\.so\.[0-9.]*\)[ 	]*$_\1"\2-ia64\3 \2\3"_
++/LD_TRACE_LOADED_OBJECTS=1/a\
++add_env="$add_env LD_LIBRARY_VERSION=\\$verify_out"
++s_^\(RTLDLIST=\)/lib64/ld\([^ 	]*\)-ia64\(\.so\.[0-9.]*\)[ 	]*$_\1"/lib/ld\2-ia64\3 /lib/ld\2\3"_
++s_^\(RTLDLIST=\)\([^"][^ 	]*\)-ia64\(\.so\.[0-9.]*\)[ 	]*$_\1"\2-ia64\3 \2\3"_
+--- libc/sysdeps/unix/sysv/linux/ia64/ldconfig.h.jj	2001-07-06 06:56:17.000000000 +0200
++++ libc/sysdeps/unix/sysv/linux/ia64/ldconfig.h	2004-05-14 15:45:40.103783087 +0200
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2001 Free Software Foundation, Inc.
++/* Copyright (C) 2001, 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
+@@ -19,7 +19,8 @@
+ #include <sysdeps/generic/ldconfig.h>
+ 
+ #define SYSDEP_KNOWN_INTERPRETER_NAMES \
+-  { "/lib/ld-linux.so.2", FLAG_ELF_LIBC6 },
++  { "/lib/ld-linux.so.2", FLAG_ELF_LIBC6 }, \
++  { "/lib64/ld-linux-ia64.so.2", FLAG_ELF_LIBC6 },
+ #define SYSDEP_KNOWN_LIBRARY_NAMES \
+   { "libc.so.6", FLAG_ELF_LIBC6 },	\
+   { "libm.so.6", FLAG_ELF_LIBC6 },
+--- libc/sysdeps/unix/sysv/linux/ia64/dl-cache.h.jj	2001-07-06 06:56:17.000000000 +0200
++++ libc/sysdeps/unix/sysv/linux/ia64/dl-cache.h	2004-05-14 15:41:11.658891907 +0200
+@@ -1,5 +1,5 @@
+ /* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
+-   Copyright (C) 2000 Free Software Foundation, Inc.
++   Copyright (C) 2000, 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
+@@ -22,4 +22,4 @@
+ #define _dl_cache_check_flags(flags) \
+   ((flags) == _DL_CACHE_DEFAULT_ID)
+ 
+-#include_next <dl-cache.h>
++#include <sysdeps/unix/sysv/linux/sparc/dl-cache.h>
+--- libc/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h.jj	2004-05-14 15:42:13.018895395 +0200
++++ libc/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h	2003-07-23 00:06:23.000000000 +0200
+@@ -0,0 +1,5 @@
++#ifdef IS_IN_ldconfig
++#include <sysdeps/unix/sysv/linux/i386/dl-procinfo.h>
++#else
++#include <sysdeps/generic/dl-procinfo.h>
++#endif
diff --git a/fedora/glibc-nptl-check.patch b/fedora/glibc-nptl-check.patch
new file mode 100644
index 0000000000..48951ea5e8
--- /dev/null
+++ b/fedora/glibc-nptl-check.patch
@@ -0,0 +1,48 @@
+--- libc/sysdeps/unix/sysv/linux/dl-osinfo.h.jj	2002-12-10 09:09:24.000000000 -0500
++++ libc/sysdeps/unix/sysv/linux/dl-osinfo.h	2003-05-20 17:05:37.000000000 -0400
+@@ -22,6 +22,7 @@
+ #include <sys/sysctl.h>
+ #include <sys/utsname.h>
+ #include "kernel-features.h"
++#include <sysdep.h>
+ 
+ #ifndef MIN
+ # define MIN(a,b) (((a)<(b))?(a):(b))
+@@ -37,8 +38,29 @@ dl_fatal (const char *str)
+   _dl_dprintf (2, str);
+   _exit (1);
+ }
+-#endif
+ 
++static inline void
++__attribute__ ((always_inline))
++dl_redhat_nptl_check (const char *cp)
++{
++  cp = strchr (cp, 'n');
++  if (__builtin_expect (cp == NULL || cp[1] != 'p'
++			|| cp[2] != 't' || cp[3] != 'l', 0)
++      && GLRO(dl_osversion) < 0x20545
++      && GLRO(dl_osversion) > 0x20413)
++    {
++#ifdef __NR_set_tid_address
++      INTERNAL_SYSCALL_DECL (err);
++      int ret;
++      ret = INTERNAL_SYSCALL (set_tid_address, err, 1, NULL);
++      if (INTERNAL_SYSCALL_ERROR_P (ret, err))
++#endif
++	GLRO(dl_osversion) = 0x20413;
++    }
++}
++#else
++#define dl_redhat_nptl_check(cp)
++#endif
+ 
+ #define DL_SYSDEP_OSCHECK(FATAL) \
+   do {									      \
+@@ -105,5 +127,6 @@ dl_fatal (const char *str)
+ 	  FATAL ("FATAL: kernel too old\n");				      \
+ 									      \
+ 	GLRO(dl_osversion) = version;					      \
++	dl_redhat_nptl_check (cp);					      \
+       }									      \
+   } while (0)
diff --git a/fedora/glibc-ppc-assume.patch b/fedora/glibc-ppc-assume.patch
new file mode 100644
index 0000000000..cfad4c9070
--- /dev/null
+++ b/fedora/glibc-ppc-assume.patch
@@ -0,0 +1,18 @@
+--- libc/sysdeps/unix/sysv/linux/powerpc/kernel-features.h.jj	2003-01-30 05:24:37.000000000 -0500
++++ libc/sysdeps/unix/sysv/linux/powerpc/kernel-features.h	2003-09-23 18:28:07.000000000 -0400
+@@ -0,0 +1,15 @@
++/* In RHEL3, we can assume the shipped kernel, which is 2.4.21.  */
++#include_next <kernel-features.h>
++
++#if !defined __ASSUME_NEW_PRCTL_SYSCALL && defined __powerpc__
++# define __ASSUME_NEW_PRCTL_SYSCALL		1
++#endif
++
++#if !defined __ASSUME_FIXED_CLONE_SYSCALL && defined __powerpc__ \
++    && !defined __powerpc64__
++# define __ASSUME_FIXED_CLONE_SYSCALL		1
++#endif
++
++#if !defined __ASSUME_NEW_RT_SIGRETURN_SYSCALL && defined __powerpc64__
++# define __ASSUME_NEW_RT_SIGRETURN_SYSCALL	1
++#endif