diff -Nru glibc-2.19/debian/changelog glibc-2.19/debian/changelog --- glibc-2.19/debian/changelog 2015-02-09 05:26:21.000000000 +0000 +++ glibc-2.19/debian/changelog 2015-02-28 08:02:44.000000000 +0000 @@ -1,3 +1,10 @@ +glibc (2.19-15ubuntu2) vivid; urgency=medium + + * debian/patches/any/cvs-vismain-pie.diff: Compile vismain with -fPIE + and link with -pie to fix testsuite failure with the new binutils. + + -- Adam Conrad Sat, 28 Feb 2015 00:59:56 -0700 + glibc (2.19-15ubuntu1) vivid; urgency=medium * Merge with Debian unstable, bringing in several security and bug fixes diff -Nru glibc-2.19/debian/patches/any/cvs-vismain-pie.diff glibc-2.19/debian/patches/any/cvs-vismain-pie.diff --- glibc-2.19/debian/patches/any/cvs-vismain-pie.diff 1970-01-01 00:00:00.000000000 +0000 +++ glibc-2.19/debian/patches/any/cvs-vismain-pie.diff 2015-02-28 08:10:27.000000000 +0000 @@ -0,0 +1,55 @@ +commit ef4ad06fe5a615af9550d74b1b6d546b9dc0a64d +Author: H.J. Lu +Date: Fri Feb 27 13:56:44 2015 -0800 + + Compile vismain with -fPIE and link with -pie + + Protocted symbol in shared library can only be accessed from PIE + or shared library. Linker in binutils 2.26 enforces it. We must + compile vismain with -fPIE and link it with -pie. + + [BZ #17711] + * elf/Makefile (tests): Add vismain only if PIE is enabled. + (tests-pie): Add vismain. + (CFLAGS-vismain.c): New. + * elf/vismain.c: Add comments for PIE requirement. + +diff --git a/elf/Makefile b/elf/Makefile +index f78642e..20b1682 100644 +--- a/elf/Makefile ++++ b/elf/Makefile +@@ -130,7 +130,7 @@ endif + tests += $(tests-static) + ifeq (yes,$(build-shared)) + tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \ +- constload1 order vismain noload filter unload \ ++ constload1 order noload filter unload \ + reldep reldep2 reldep3 reldep4 nodelete nodelete2 \ + nodlopen nodlopen2 neededtest neededtest2 \ + neededtest3 neededtest4 unload2 lateglobal initfirst global \ +@@ -218,6 +218,9 @@ ifeq (yesyes,$(have-fpie)$(build-shared)) + modules-names += tst-piemod1 + tests += tst-pie1 + tests-pie += tst-pie1 ++tests += vismain ++tests-pie += vismain ++CFLAGS-vismain.c = $(PIE-ccflag) + endif + modules-execstack-yes = tst-execstack-mod + extra-test-objs += $(addsuffix .os,$(strip $(modules-names))) +diff --git a/elf/vismain.c b/elf/vismain.c +index dfcaeeb..05b3748 100644 +--- a/elf/vismain.c ++++ b/elf/vismain.c +@@ -15,6 +15,11 @@ + License along with the GNU C Library; if not, see + . */ + ++/* This file must be compiled as PIE to avoid copy relocation when ++ accessing protected symbols defined in shared libaries since copy ++ relocation doesn't work with protected symbols and linker in ++ binutils 2.26 enforces this rule. */ ++ + #include + #include + #include diff -Nru glibc-2.19/debian/patches/series glibc-2.19/debian/patches/series --- glibc-2.19/debian/patches/series 2015-02-09 05:25:25.000000000 +0000 +++ glibc-2.19/debian/patches/series 2015-02-28 08:03:06.000000000 +0000 @@ -269,6 +269,7 @@ any/cvs-getnetbyname.diff any/cvs-vfprintf.diff any/cvs-wscanf.diff +any/cvs-vismain-pie.diff # Ubuntu patches live in their own little world, to maintain sanity ubuntu/lddebug-scopes.diff