packages: glibc/glibc.spec, glibc/0020_all_glibc-tweak-rfc1918-lookup.patch...

arekm arekm at pld-linux.org
Sun Apr 10 13:44:25 CEST 2011


Author: arekm                        Date: Sun Apr 10 11:44:25 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
rel 5; fixes and updated version of patches from gentoo

---- Files affected:
packages/glibc:
   glibc.spec (1.901 -> 1.902) , 0020_all_glibc-tweak-rfc1918-lookup.patch (NONE -> 1.1)  (NEW), 0050_all_glibc-2.13-ldso-prelink-segv.patch (NONE -> 1.1)  (NEW), 0055_all_glibc-2.12-static-shared-getpagesize.patch (NONE -> 1.1)  (NEW), 0060_all_glibc-2.13-static-memmove-ssse3.patch (NONE -> 1.1)  (NEW), 0061_all_glibc-2.13-static-memset.patch (NONE -> 1.1)  (NEW), 1055_all_glibc-resolv-dynamic.patch (NONE -> 1.1)  (NEW), 1070_all_glibc-fadvise64_64.patch (NONE -> 1.1)  (NEW), glibc-2.13-static-memmove-ssse3.patch (1.1 -> NONE)  (REMOVED), glibc-static-glro-init.patch (1.1 -> NONE)  (REMOVED), nscd.upstart (1.1 -> NONE)  (REMOVED)

---- Diffs:

================================================================
Index: packages/glibc/glibc.spec
diff -u packages/glibc/glibc.spec:1.901 packages/glibc/glibc.spec:1.902
--- packages/glibc/glibc.spec:1.901	Fri Apr  1 22:11:01 2011
+++ packages/glibc/glibc.spec	Sun Apr 10 13:44:19 2011
@@ -35,7 +35,7 @@
 Summary(uk.UTF-8):	GNU libc версії
 Name:		glibc
 Version:	2.13
-Release:	4
+Release:	5
 Epoch:		6
 License:	LGPL v2.1+
 Group:		Libraries
@@ -76,11 +76,16 @@
 Patch26:	%{name}-posix-sh.patch
 Patch27:	%{name}-i686.patch
 Patch29:	%{name}-arm-alignment-fix.patch
-Patch30:	%{name}-static-glro-init.patch
+Patch30:	%{name}-bug-12492.patch
 Patch31:	%{name}-origin.patch
 Patch32:	%{name}-Os-fail-workaround.patch
-Patch33:	%{name}-2.13-static-memmove-ssse3.patch
-Patch34:	%{name}-bug-12492.patch
+Patch33:	0020_all_glibc-tweak-rfc1918-lookup.patch
+Patch34:	0050_all_glibc-2.13-ldso-prelink-segv.patch
+Patch35:	0055_all_glibc-2.12-static-shared-getpagesize.patch
+Patch36:	0060_all_glibc-2.13-static-memmove-ssse3.patch
+Patch37:	0061_all_glibc-2.13-static-memset.patch
+Patch38:	1055_all_glibc-resolv-dynamic.patch
+Patch39:	1070_all_glibc-fadvise64_64.patch
 URL:		http://www.gnu.org/software/libc/
 %{?with_selinux:BuildRequires:	audit-libs-devel}
 BuildRequires:	autoconf
@@ -928,11 +933,16 @@
 %patch26 -p1
 %patch27 -p1
 %patch29 -p1
-%patch30 -p1
+%patch30 -p0
 %patch31 -p1
 %patch32 -p1
 %patch33 -p1
-%patch34 -p0
+%patch34 -p1
+%patch35 -p1
+%patch36 -p1
+%patch37 -p1
+%patch38 -p1
+%patch39 -p1
 
 # cleanup backups after patching
 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
@@ -1718,6 +1728,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.902  2011/04/10 11:44:19  arekm
+rel 5; fixes and updated version of patches from gentoo
+
 Revision 1.901  2011/04/01 20:11:01  arekm
 - rel 4; blowfish patch from suse; this one handles invalid salt correctly (aka returns NULL)
 

================================================================
Index: packages/glibc/0020_all_glibc-tweak-rfc1918-lookup.patch
diff -u /dev/null packages/glibc/0020_all_glibc-tweak-rfc1918-lookup.patch:1.1
--- /dev/null	Sun Apr 10 13:44:25 2011
+++ packages/glibc/0020_all_glibc-tweak-rfc1918-lookup.patch	Sun Apr 10 13:44:19 2011
@@ -0,0 +1,27 @@
+http://bugs.gentoo.org/315977
+
+diff --git a/posix/gai.conf b/posix/gai.conf
+index 195287e..efba67b 100644
+--- a/posix/gai.conf
++++ b/posix/gai.conf
+@@ -56,9 +56,7 @@
+ #
+ # scopev4  <mask>  <value>
+ #    Add another rule to the RFC 3484 scope table for IPv4 addresses.
+-#    By default the scope IDs described in section 3.2 in RFC 3484 are
+-#    used.  Changing these defaults should hardly ever be necessary.
+-#    The defaults are equivalent to:
++#    The definitions in RFC 3484 are equivalent to:
+ #
+ #scopev4 ::ffff:169.254.0.0/112  2
+ #scopev4 ::ffff:127.0.0.0/104    2
+@@ -72,6 +70,6 @@
+ #    have the same scope and are therefore not sorted first.  To change
+ #    this use only these rules:
+ #
+-#scopev4 ::ffff:169.254.0.0/112  2
+-#scopev4 ::ffff:127.0.0.0/104    2
+-#scopev4 ::ffff:0.0.0.0/96       14
++scopev4 ::ffff:169.254.0.0/112  2
++scopev4 ::ffff:127.0.0.0/104    2
++scopev4 ::ffff:0.0.0.0/96       14

================================================================
Index: packages/glibc/0050_all_glibc-2.13-ldso-prelink-segv.patch
diff -u /dev/null packages/glibc/0050_all_glibc-2.13-ldso-prelink-segv.patch:1.1
--- /dev/null	Sun Apr 10 13:44:25 2011
+++ packages/glibc/0050_all_glibc-2.13-ldso-prelink-segv.patch	Sun Apr 10 13:44:19 2011
@@ -0,0 +1,47 @@
+http://bugs.gentoo.org/353814
+http://sources.redhat.com/bugzilla/show_bug.cgi?id=12489
+
+From 25b3aadaf646bff18d6527e03717c87bf50b3a50 Mon Sep 17 00:00:00 2001
+From: Andreas Schwab <schwab at redhat.com>
+Date: Tue, 28 Sep 2010 15:11:48 +0200
+Subject: [PATCH] Don't try to write to _rtld_global_ro after performing relro protection
+
+---
+ ChangeLog  |    5 +++++
+ elf/rtld.c |    8 ++++----
+ 2 files changed, 9 insertions(+), 4 deletions(-)
+
+2010-09-28  Andreas Schwab  <schwab at redhat.com>
+
+	* elf/rtld.c (dl_main): Move setting of GLRO(dl_init_all_dirs)
+	before performing relro protection.
+
+diff --git a/elf/rtld.c b/elf/rtld.c
+index 9a560b3..201c9cf 100644
+--- a/elf/rtld.c
++++ b/elf/rtld.c
+@@ -2168,6 +2168,10 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
+      we need it in the memory handling later.  */
+   GLRO(dl_initial_searchlist) = *GL(dl_ns)[LM_ID_BASE]._ns_main_searchlist;
+ 
++  /* Remember the last search directory added at startup, now that
++     malloc will no longer be the one from dl-minimal.c.  */
++  GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
++
+   if (prelinked)
+     {
+       if (main_map->l_info [ADDRIDX (DT_GNU_CONFLICT)] != NULL)
+@@ -2288,10 +2292,6 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
+ 			  lossage);
+     }
+ 
+-  /* Remember the last search directory added at startup, now that
+-     malloc will no longer be the one from dl-minimal.c.  */
+-  GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
+-
+   if (! prelinked && rtld_multiple_ref)
+     {
+       /* There was an explicit ref to the dynamic linker as a shared lib.
+-- 
+1.7.4.rc2
+

================================================================
Index: packages/glibc/0055_all_glibc-2.12-static-shared-getpagesize.patch
diff -u /dev/null packages/glibc/0055_all_glibc-2.12-static-shared-getpagesize.patch:1.1
--- /dev/null	Sun Apr 10 13:44:25 2011
+++ packages/glibc/0055_all_glibc-2.12-static-shared-getpagesize.patch	Sun Apr 10 13:44:19 2011
@@ -0,0 +1,338 @@
+http://thread.gmane.org/gmane.comp.lib.glibc.user/579
+http://sources.redhat.com/bugzilla/show_bug.cgi?id=11929
+http://bugs.gentoo.org/332927
+
+a simple statically linked app fails with glibc-2.12:
+	$ cat test.c
+	main(){getpwnam("root");}
+	$ gcc -static test.c
+	$ ./a.out
+	a.out: ../sysdeps/unix/sysv/linux/getpagesize.c:32: __getpagesize:
+		Assertion `_rtld_global_ro._dl_pagesize != 0' failed.
+	Aborted (core dumped)
+
+the crux of the matter seems to be the fact that static apps with
+glibc will dynamically load nss shared libraries when necessary.  the
+static code will initialize GLRO(dl_pagesize) just fine from the
+kernel auxv, but this being the static code paths, GLRO(dl_pagesize)
+expands into _dl_pagesize.  when the nss shared libraries are loaded
+up, the ldso is also mapped in, but it doesnt process the kernel auxv
+(_dl_sysdep_start() is not called).  so the shared library
+GLRO(dl_pagesize) expands into _rtld_global_ro._dl_pagesize and that
+field stays at 0.
+
+then when the nss shared libs process the request and gets to the
+standard "passwd" database, it calls the shared lib versions of
+malloc/stdio which rely on the __getpagesize() function.  but this
+being in the shared library, it reads the shared GLRO(dl_pagesize)
+which is 0, and the assert() is triggered.
+
+i think running nscd makes things work because its nss module that
+talks to the nscd daemon doesnt call any routines that implicitly rely
+on __getpagesize().
+
+this all started happening after this commit:
+From 8f4a5048eea6536ee85c0f2670adbb97d71e427d Mon Sep 17 00:00:00 2001
+From: Ulrich Drepper <drepper at redhat.com>
+Date: Sat, 27 Mar 2010 06:19:50 -0700
+Subject: [PATCH] Optimize __getpagesize a bit.
+
+if we look at the ia64 port, we see that it has had similar logic for
+its __getpagesize function forever.  so take its DL_STATIC_INIT code
+and move it up to the common linux tree.
+
+2010-08-18  Mike Frysinger  <vapier at gentoo.org>
+
+	* sysdeps/unix/sysv/linux/ia64/Makefile: Move dl-static addition to
+	sysdep vars for subdir==elf to ...
+	* sysdeps/unix/sysv/linux/Makefile: ... here.
+	* sysdeps/unix/sysv/linux/ia64/dl-static.c: Move file to ...
+	* sysdeps/unix/sysv/linux/dl-static.c: ... here.
+	* sysdeps/unix/sysv/linux/ia64/ldsodefs.h: Delete, and move the
+	DL_STATIC_INIT defines to ...
+	* sysdeps/unix/sysv/linux/ldsodefs.h: ... here.
+	* sysdeps/unix/sysv/linux/ia64/getpagesize.c: Delete.
+
+diff --git a/sysdeps/unix/sysv/linux/ia64/Makefile b/sysdeps/unix/sysv/linux/ia64/Makefile
+index d9a35a7..3bb1ce0 100644
+--- a/sysdeps/unix/sysv/linux/ia64/Makefile
++++ b/sysdeps/unix/sysv/linux/ia64/Makefile
+@@ -12,12 +12,6 @@ sysdep_headers += sys/io.h
+ sysdep_routines += ioperm clone2
+ endif
+ 
+-ifeq ($(subdir),elf)
+-sysdep-dl-routines += dl-static
+-sysdep_routines += $(sysdep-dl-routines)
+-sysdep-rtld-routines += $(sysdep-dl-routines)
+-endif
+-
+ ifeq ($(subdir),rt)
+ librt-routines += rt-sysdep
+ endif
+diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
+index 4302bd3..37c56a3 100644
+--- a/sysdeps/unix/sysv/linux/Makefile
++++ b/sysdeps/unix/sysv/linux/Makefile
+@@ -147,7 +147,9 @@ sysdep_routines += xstatconv internal_statvfs internal_statvfs64 \
+ endif
+ 
+ ifeq ($(subdir),elf)
+-sysdep-rtld-routines += dl-brk dl-sbrk
++sysdep-dl-routines += dl-static
++sysdep_routines += dl-static
++sysdep-rtld-routines += dl-brk dl-sbrk dl-static
+ 
+ CPPFLAGS-lddlibc4 += -DNOT_IN_libc
+ endif
+diff --git a/sysdeps/unix/sysv/linux/ia64/dl-static.c b/sysdeps/unix/sysv/linux/ia64/dl-static.c
+deleted file mode 100644
+index 4efc077..0000000
+--- a/sysdeps/unix/sysv/linux/ia64/dl-static.c
++++ /dev/null
+@@ -1,69 +0,0 @@
+-/* Variable initialization.  IA-64 version.
+-   Copyright (C) 2001, 2002, 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
+-   modify it under the terms of the GNU Lesser General Public
+-   License as published by the Free Software Foundation; either
+-   version 2.1 of the License, or (at your option) any later version.
+-
+-   The GNU C Library is distributed in the hope that it will be useful,
+-   but WITHOUT ANY WARRANTY; without even the implied warranty of
+-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+-   Lesser General Public License for more details.
+-
+-   You should have received a copy of the GNU Lesser General Public
+-   License along with the GNU C Library; if not, write to the Free
+-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+-   02111-1307 USA.  */
+-
+-#include <ldsodefs.h>
+-
+-#ifdef SHARED
+-
+-void
+-_dl_var_init (void *array[])
+-{
+-  /* It has to match "variables" below. */
+-  enum
+-    {
+-      DL_PAGESIZE = 0,
+-      DL_CLKTCK
+-    };
+-
+-  GLRO(dl_pagesize) = *((size_t *) array[DL_PAGESIZE]);
+-  GLRO(dl_clktck) = *((int *) array[DL_CLKTCK]);
+-}
+-
+-#else
+-#include <bits/libc-lock.h>
+-
+-__libc_lock_define_initialized_recursive (static, _dl_static_lock)
+-
+-static void *variables[] =
+-{
+-  &GLRO(dl_pagesize),
+-  &GLRO(dl_clktck)
+-};
+-
+-void
+-_dl_static_init (struct link_map *map)
+-{
+-  const ElfW(Sym) *ref = NULL;
+-  lookup_t loadbase;
+-  void (*f) (void *[]);
+-
+-  __libc_lock_lock_recursive (_dl_static_lock);
+-
+-  loadbase = _dl_lookup_symbol_x ("_dl_var_init", map, &ref,
+-				  map->l_local_scope, NULL, 0, 1, NULL);
+-  if (ref != NULL)
+-    {
+-      f = (void (*) (void *[])) DL_SYMBOL_ADDRESS (loadbase, ref);
+-      f (variables);
+-    }
+-
+-  __libc_lock_unlock_recursive (_dl_static_lock);
+-}
+-
+-#endif
+diff --git a/sysdeps/unix/sysv/linux/dl-static.c b/sysdeps/unix/sysv/linux/dl-static.c
+new file mode 100644
+index 0000000..fa70811
+--- /dev/null
++++ b/sysdeps/unix/sysv/linux/dl-static.c
+@@ -0,0 +1,69 @@
++/* Variable initialization.
++   Copyright (C) 2001, 2002, 2003, 2004, 2010 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
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <ldsodefs.h>
++
++#ifdef SHARED
++
++void
++_dl_var_init (void *array[])
++{
++  /* It has to match "variables" below. */
++  enum
++    {
++      DL_PAGESIZE = 0,
++      DL_CLKTCK
++    };
++
++  GLRO(dl_pagesize) = *((size_t *) array[DL_PAGESIZE]);
++  GLRO(dl_clktck) = *((int *) array[DL_CLKTCK]);
++}
++
++#else
++#include <bits/libc-lock.h>
++
++__libc_lock_define_initialized_recursive (static, _dl_static_lock)
++
++static void *variables[] =
++{
++  &GLRO(dl_pagesize),
++  &GLRO(dl_clktck)
++};
++
++void
++_dl_static_init (struct link_map *map)
++{
++  const ElfW(Sym) *ref = NULL;
++  lookup_t loadbase;
++  void (*f) (void *[]);
++
++  __libc_lock_lock_recursive (_dl_static_lock);
++
++  loadbase = _dl_lookup_symbol_x ("_dl_var_init", map, &ref,
++				  map->l_local_scope, NULL, 0, 1, NULL);
++  if (ref != NULL)
++    {
++      f = (void (*) (void *[])) DL_SYMBOL_ADDRESS (loadbase, ref);
++      f (variables);
++    }
++
++  __libc_lock_unlock_recursive (_dl_static_lock);
++}
++
++#endif
+diff --git a/sysdeps/unix/sysv/linux/ia64/ldsodefs.h b/sysdeps/unix/sysv/linux/ia64/ldsodefs.h
+deleted file mode 100644
+index 31af624..0000000
+--- a/sysdeps/unix/sysv/linux/ia64/ldsodefs.h
++++ /dev/null
+@@ -1,33 +0,0 @@
+-/* Run-time dynamic linker data structures for loaded ELF shared objects. IA64.
+-   Copyright (C) 2001 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
+-   modify it under the terms of the GNU Lesser General Public
+-   License as published by the Free Software Foundation; either
+-   version 2.1 of the License, or (at your option) any later version.
+-
+-   The GNU C Library is distributed in the hope that it will be useful,
+-   but WITHOUT ANY WARRANTY; without even the implied warranty of
+-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+-   Lesser General Public License for more details.
+-
+-   You should have received a copy of the GNU Lesser General Public
+-   License along with the GNU C Library; if not, write to the Free
+-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+-   02111-1307 USA.  */
+-
+-#ifndef	_LDSODEFS_H
+-
+-/* Get the real definitions.  */
+-#include_next <ldsodefs.h>
+-
+-/* Now define our stuff.  */
+-
+-/* We need special support to initialize DSO loaded for statically linked
+-   binaries.  */
+-extern void _dl_static_init (struct link_map *map);
+-#undef DL_STATIC_INIT
+-#define DL_STATIC_INIT(map) _dl_static_init (map)
+-
+-#endif /* ldsodefs.h */
+diff --git a/sysdeps/unix/sysv/linux/ldsodefs.h b/sysdeps/unix/sysv/linux/ldsodefs.h
+index 5d5b1b4..ecb5d4f 100644
+--- a/sysdeps/unix/sysv/linux/ldsodefs.h
++++ b/sysdeps/unix/sysv/linux/ldsodefs.h
+@@ -36,6 +36,12 @@ extern void _dl_aux_init (ElfW(auxv_t) *av) internal_function;
+ /* Initialization which is normally done by the dynamic linker.  */
+ extern void _dl_non_dynamic_init (void) internal_function;
+ 
++/* We need special support to initialize DSO loaded for statically linked
++   binaries.  */
++extern void _dl_static_init (struct link_map *map);
++#undef DL_STATIC_INIT
++#define DL_STATIC_INIT(map) _dl_static_init (map)
++
+ /* We can assume that the kernel always provides the AT_UID, AT_EUID,
+    AT_GID, and AT_EGID values in the auxiliary vector from 2.4.0 or so on.  */
+ #if __ASSUME_AT_XID
+diff --git a/sysdeps/unix/sysv/linux/ia64/getpagesize.c b/sysdeps/unix/sysv/linux/ia64/getpagesize.c
+deleted file mode 100644
+index 1155dfd..0000000
+--- a/sysdeps/unix/sysv/linux/ia64/getpagesize.c
++++ /dev/null
+@@ -1,39 +0,0 @@
+-/* Copyright (C) 1999, 2000, 2001, 2002, 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
+-   modify it under the terms of the GNU Lesser General Public
+-   License as published by the Free Software Foundation; either
+-   version 2.1 of the License, or (at your option) any later version.
+-
+-   The GNU C Library is distributed in the hope that it will be useful,
+-   but WITHOUT ANY WARRANTY; without even the implied warranty of
+-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+-   Lesser General Public License for more details.
+-
+-   You should have received a copy of the GNU Lesser General Public
+-   License along with the GNU C Library; if not, write to the Free
+-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+-   02111-1307 USA.  */
+-
+-#include <assert.h>
+-#include <unistd.h>
+-#include <sys/param.h>
+-
+-#include <ldsodefs.h>
+-#include <sysdep.h>
+-#include <sys/syscall.h>
+-
+-/* Return the system page size.  The return value will depend on how
+-   the kernel is configured.  A program must use this call to
+-   determine the page size to ensure proper alignment for calls such
+-   as mmap and friends.  --davidm 99/11/30 */
+-
+-int
+-__getpagesize ()
+-{
+-  assert (GLRO(dl_pagesize) != 0);
+-  return GLRO(dl_pagesize);
+-}
+-libc_hidden_def (__getpagesize)
+-weak_alias (__getpagesize, getpagesize)

================================================================
Index: packages/glibc/0060_all_glibc-2.13-static-memmove-ssse3.patch
diff -u /dev/null packages/glibc/0060_all_glibc-2.13-static-memmove-ssse3.patch:1.1
--- /dev/null	Sun Apr 10 13:44:25 2011
+++ packages/glibc/0060_all_glibc-2.13-static-memmove-ssse3.patch	Sun Apr 10 13:44:19 2011
@@ -0,0 +1,95 @@
+http://bugs.gentoo.org/353816
+http://sourceware.org/ml/libc-alpha/2011-02/msg00015.html
+
+From 7da767805f0a7301c0c719a6c0fd51d87e193c22 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier at gentoo.org>
+Date: Sun, 6 Feb 2011 12:39:08 -0500
+Subject: [PATCH] memcpy-ssse3: enable chk symbols in static builds
+
+Building static apps on i686/x86_64 systems which use memmove such as:
+	#include <string.h>
+	char buf[8192];
+	main(int argc, char **argv) { memmove(buf, buf + argc, argc % 4); }
+
+Result in linking errors along the lines of:
+	.../libc.a(memmove_chk.o): In function `__memmove_chk':
+	(.text+0x1b4): undefined reference to `__memmove_chk_ssse3_back'
+	.../libc.a(memmove_chk.o): In function `__memmove_chk':
+	(.text+0x1b9): undefined reference to `__memmove_chk_ssse3'
+	collect2: ld returned 1 exit status
+
+This is due to the new ssse3 funcs only enabling their chk symbols when
+being compiled into shared code.
+
+URL: https://bugs.gentoo.org/353816
+Signed-off-by: Mike Frysinger <vapier at gentoo.org>
+
+2011-02-06  Mike Frysinger  <vapier at gentoo.org>
+
+	* sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S: Only protect
+	MEMCPY_CHK with USE_AS_BCOPY ifdef check.
+	* sysdeps/i386/i686/multiarch/memcpy-ssse3.S: Likewise.
+	* sysdeps/x86_64/multiarch/memcpy-ssse3.S: Likewise.
+	* sysdeps/x86_64/multiarch/memcpy-ssse3-back.S: Likewise.
+---
+ sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S |    2 +-
+ sysdeps/i386/i686/multiarch/memcpy-ssse3.S     |    2 +-
+ sysdeps/x86_64/multiarch/memcpy-ssse3-back.S   |    2 +-
+ sysdeps/x86_64/multiarch/memcpy-ssse3.S        |    2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S b/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S
+index 48a109c..8e81183 100644
+--- a/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S
++++ b/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S
+@@ -110,7 +110,7 @@ __i686.get_pc_thunk.bx:
+ #endif
+ 
+ 	.section .text.ssse3,"ax", at progbits
+-#if defined SHARED && !defined NOT_IN_libc && !defined USE_AS_BCOPY
++#if !defined USE_AS_BCOPY
+ ENTRY (MEMCPY_CHK)
+ 	movl	12(%esp), %eax
+ 	cmpl	%eax, 16(%esp)
+diff --git a/sysdeps/i386/i686/multiarch/memcpy-ssse3.S b/sysdeps/i386/i686/multiarch/memcpy-ssse3.S
+index ec9eeb9..f64f8d2 100644
+--- a/sysdeps/i386/i686/multiarch/memcpy-ssse3.S
++++ b/sysdeps/i386/i686/multiarch/memcpy-ssse3.S
+@@ -110,7 +110,7 @@ __i686.get_pc_thunk.bx:
+ #endif
+ 
+ 	.section .text.ssse3,"ax", at progbits
+-#if defined SHARED && !defined NOT_IN_libc && !defined USE_AS_BCOPY
++#if !defined USE_AS_BCOPY
+ ENTRY (MEMCPY_CHK)
+ 	movl	12(%esp), %eax
+ 	cmpl	%eax, 16(%esp)
+diff --git a/sysdeps/x86_64/multiarch/memcpy-ssse3-back.S b/sysdeps/x86_64/multiarch/memcpy-ssse3-back.S
+index 48c974e..bdd114a 100644
+--- a/sysdeps/x86_64/multiarch/memcpy-ssse3-back.S
++++ b/sysdeps/x86_64/multiarch/memcpy-ssse3-back.S
+@@ -49,7 +49,7 @@
+   ud2
+ 
+ 	.section .text.ssse3,"ax", at progbits
+-#if defined SHARED && !defined NOT_IN_libc
++#if !defined USE_AS_BCOPY
+ ENTRY (MEMCPY_CHK)
+ 	cmpq	%rdx, %rcx
+ 	jb	HIDDEN_JUMPTARGET (__chk_fail)
+diff --git a/sysdeps/x86_64/multiarch/memcpy-ssse3.S b/sysdeps/x86_64/multiarch/memcpy-ssse3.S
+index 9a878d3..cd7e45f 100644
+--- a/sysdeps/x86_64/multiarch/memcpy-ssse3.S
++++ b/sysdeps/x86_64/multiarch/memcpy-ssse3.S
+@@ -49,7 +49,7 @@
+   ud2
+ 
+ 	.section .text.ssse3,"ax", at progbits
+-#if defined SHARED && !defined NOT_IN_libc
++#if !defined USE_AS_BCOPY
+ ENTRY (MEMCPY_CHK)
+ 	cmpq	%rdx, %rcx
+ 	jb	HIDDEN_JUMPTARGET (__chk_fail)
+-- 
+1.7.4.rc2
+

================================================================
Index: packages/glibc/0061_all_glibc-2.13-static-memset.patch
diff -u /dev/null packages/glibc/0061_all_glibc-2.13-static-memset.patch:1.1
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/glibc/glibc.spec?r1=1.901&r2=1.902&f=u



More information about the pld-cvs-commit mailing list