r1068 - in glibc-package/trunk/debian: . patches
Author: pb
Date: 2005-12-25 20:25:30 +0000 (Sun, 25 Dec 2005)
New Revision: 1068
Added:
glibc-package/trunk/debian/patches/arm-socket-weakalias.dpatch
glibc-package/trunk/debian/patches/powerpc-executable-got.dpatch
Modified:
glibc-package/trunk/debian/changelog
glibc-package/trunk/debian/patches/00list
Log:
[ Phil Blundell ]
* Merge patch from upstream CVS (courtesy Daniel Jacobowitz) to
fix weak alias related build problem on ARM.
* Merge patch from upstream CVS (courtesy Ulrich Drepper) to fix
strfry() crash. (Closes: #343365)
* Merge patch from upstream CVS (courtesy Roland McGrath and Anton
Blanchard) to fix problem with execute permissions on GOT when using
64kB pages on PowerPC. (Closes: #344105)
* Require binutils 2.16.1cvs20051109-1 to ensure that i386 biarch
linking works properly.
Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog 2005-12-20 01:07:01 UTC (rev 1067)
+++ glibc-package/trunk/debian/changelog 2005-12-25 20:25:30 UTC (rev 1068)
@@ -4,6 +4,17 @@
* debian/local/etc_init.d/glibc.sh: Change the last 'exit 0' to
': exit 0' to not block sourcing. (Closes: #340147)
+ [ Phil Blundell ]
+ * Merge patch from upstream CVS (courtesy Daniel Jacobowitz) to
+ fix weak alias related build problem on ARM.
+ * Merge patch from upstream CVS (courtesy Ulrich Drepper) to fix
+ strfry() crash. (Closes: #343365)
+ * Merge patch from upstream CVS (courtesy Roland McGrath and Anton
+ Blanchard) to fix problem with execute permissions on GOT when using
+ 64kB pages on PowerPC. (Closes: #344105)
+ * Require binutils 2.16.1cvs20051109-1 to ensure that i386 biarch
+ linking works properly.
+
-- GOTO Masanori <gotom@debian.org> Tue, 20 Dec 2005 09:51:34 +0900
glibc (2.3.5-9) unstable; urgency=low
Modified: glibc-package/trunk/debian/patches/00list
===================================================================
--- glibc-package/trunk/debian/patches/00list 2005-12-20 01:07:01 UTC (rev 1067)
+++ glibc-package/trunk/debian/patches/00list 2005-12-25 20:25:30 UTC (rev 1068)
@@ -93,4 +93,7 @@
sparc-socket-weakalias
powerpc-socket-weakalias
amd64-semtrywait-weakalias
+arm-socket-weakalias
divdi3-moddi3
+strfry-segv
+powerpc-executable-got
Added: glibc-package/trunk/debian/patches/arm-socket-weakalias.dpatch
===================================================================
--- glibc-package/trunk/debian/patches/arm-socket-weakalias.dpatch 2005-12-20 01:07:01 UTC (rev 1067)
+++ glibc-package/trunk/debian/patches/arm-socket-weakalias.dpatch 2005-12-25 20:25:30 UTC (rev 1068)
@@ -0,0 +1,61 @@
+#! /bin/sh -e
+
+# All lines beginning with `# DP:' are a description of the patch.
+# DP: Description: Fix __bind redefinition problem
+# DP: Related bugs:
+# DP: Dpatch author: Phil Blundell
+# DP: Patch author: Daniel Jacobowitz
+# DP: Upstream status: In CVS
+# DP: Status Details:
+# DP: Date: 2005-12-25
+
+PATCHLEVEL=0
+
+if [ $# -ne 2 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch -d "$2" -f --no-backup-if-mismatch -p$PATCHLEVEL < $0;;
+ -unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p$PATCHLEVEL < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+Index: sysdeps/unix/sysv/linux/arm/socket.S
+===================================================================
+RCS file: /cvs/glibc/ports/sysdeps/unix/sysv/linux/arm/socket.S,v
+retrieving revision 1.12
+retrieving revision 1.13
+diff -u -r1.12 -r1.13
+--- sysdeps/unix/sysv/linux/arm/socket.S 4 Dec 2004 21:20:16 -0000 1.12
++++ sysdeps/unix/sysv/linux/arm/socket.S 27 Oct 2005 18:50:12 -0000 1.13
+@@ -1,4 +1,6 @@
+-/* Copyright (C) 1995, 1996, 1997, 1998, 2003 Free Software Foundation, Inc.
++/* Copyright (C) 1995, 1996, 1997, 1998, 2003, 2004, 2005
++ 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
+@@ -32,7 +34,11 @@
+ The .S files for the other calls just #define socket and #include this. */
+
+ #ifndef __socket
++#ifndef NO_WEAK_ALIAS
+ #define __socket P(__,socket)
++#else
++#define __socket socket
++#endif
+ #endif
+
+ #define PUSHARGS_1 str a1, [sp, $-4]!
+@@ -120,4 +126,6 @@
+
+ PSEUDO_END (__socket)
+
++#ifndef NO_WEAK_ALIAS
+ weak_alias (__socket, socket)
++#endif
Added: glibc-package/trunk/debian/patches/powerpc-executable-got.dpatch
===================================================================
--- glibc-package/trunk/debian/patches/powerpc-executable-got.dpatch 2005-12-20 01:07:01 UTC (rev 1067)
+++ glibc-package/trunk/debian/patches/powerpc-executable-got.dpatch 2005-12-25 20:25:30 UTC (rev 1068)
@@ -0,0 +1,73 @@
+#! /bin/sh -e
+
+# DP: Fix non-executable GOT issue with 64K pages on PPC
+
+if [ $# -ne 2 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch -d "$2" -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+2005-09-20 Roland McGrath <roland@redhat.com>
+
+ [BZ #1346]
+ * elf/dl-load.c (_dl_map_object_from_fd) [HAVE_Z_RELRO]: Do relro
+ magic on __stack_prot only if [SHARED]. Skip mprotect if __stack_prot
+ lies outside the page-rounded-down relro region.
+
+--- elf/dl-load.c~ 2005-12-14 22:27:00.000000000 -0600
++++ elf/dl-load.c 2005-12-14 22:35:59.000000000 -0600
+@@ -1314,22 +1314,36 @@
+
+ if (__builtin_expect ((stack_flags &~ GL(dl_stack_flags)) & PF_X, 0))
+ {
++ if (__builtin_expect (__check_caller (RETURN_ADDRESS (0), allow_ldso),
++ 0) != 0)
++ {
++ errstring = N_("invalid caller");
++ goto call_lose;
++ }
++
+ /* The stack is presently not executable, but this module
+ requires that it be executable. We must change the
+ protection of the variable which contains the flags used in
+ the mprotect calls. */
+-#ifdef HAVE_Z_RELRO
++#if defined HAVE_Z_RELRO && defined SHARED
+ if (mode & __RTLD_DLOPEN)
+ {
+- uintptr_t p = ((uintptr_t) &__stack_prot) & ~(GLRO(dl_pagesize) - 1);
+- size_t s = (uintptr_t) &__stack_prot - p + sizeof (int);
++ const uintptr_t p = (uintptr_t) &__stack_prot & -GLRO(dl_pagesize);
++ const size_t s = (uintptr_t) (&__stack_prot + 1) - p;
+
+- __mprotect ((void *) p, s, PROT_READ|PROT_WRITE);
+- if (__builtin_expect (__check_caller (RETURN_ADDRESS (0),
+- allow_ldso|allow_libc) == 0,
+- 0))
++ struct link_map *const m = &GL(dl_rtld_map);
++ const uintptr_t relro_end = ((m->l_addr + m->l_relro_addr
++ + m->l_relro_size)
++ & -GLRO(dl_pagesize));
++ if (__builtin_expect (p + s <= relro_end, 1))
++ {
++ /* The variable lies in the region protected by RELRO. */
++ __mprotect ((void *) p, s, PROT_READ|PROT_WRITE);
++ __stack_prot |= PROT_READ|PROT_WRITE|PROT_EXEC;
++ __mprotect ((void *) p, s, PROT_READ);
++ }
++ else
+ __stack_prot |= PROT_READ|PROT_WRITE|PROT_EXEC;
+- __mprotect ((void *) p, s, PROT_READ);
+ }
+ else
+ #endif
+
+
Property changes on: glibc-package/trunk/debian/patches/powerpc-executable-got.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Reply to: