This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.21-140-gef4ad06
- From: hjl at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 27 Feb 2015 22:13:52 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.21-140-gef4ad06
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via ef4ad06fe5a615af9550d74b1b6d546b9dc0a64d (commit)
from 2ca725c594e0c186d928dc0823be7d8b5976112c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ef4ad06fe5a615af9550d74b1b6d546b9dc0a64d
commit ef4ad06fe5a615af9550d74b1b6d546b9dc0a64d
Author: H.J. Lu <hjl.tools@gmail.com>
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/ChangeLog b/ChangeLog
index 8e6b5f1..1ac6609 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2015-02-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ [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.
+
2015-02-27 Joseph Myers <joseph@codesourcery.com>
[BZ #18046]
diff --git a/NEWS b/NEWS
index 7b83d75..1c54ede 100644
--- a/NEWS
+++ b/NEWS
@@ -10,10 +10,10 @@ Version 2.22
* The following bugs are resolved with this release:
4719, 14841, 13064, 14094, 15319, 15467, 15790, 15969, 16351, 16560,
- 16783, 17269, 17523, 17569, 17588, 17792, 17836, 17912, 17916, 17932,
- 17944, 17949, 17964, 17965, 17967, 17969, 17978, 17987, 17991, 17996,
- 17998, 17999, 18019, 18020, 18029, 18030, 18032, 18038, 18039, 18046,
- 18047.
+ 16783, 17269, 17523, 17569, 17588, 17711, 17792, 17836, 17912, 17916,
+ 17932, 17944, 17949, 17964, 17965, 17967, 17969, 17978, 17987, 17991,
+ 17996, 17998, 17999, 18019, 18020, 18029, 18030, 18032, 18038, 18039,
+ 18046, 18047.
* Character encoding and ctype tables were updated to Unicode 7.0.0, using
new generator scripts contributed by Pravin Satpute and Mike FABIAN (Red
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 tst-pie2
tests-pie += tst-pie1 tst-pie2
+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
<http://www.gnu.org/licenses/>. */
+/* 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 <stdio.h>
#include <stdlib.h>
#include <string.h>
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 8 ++++++++
NEWS | 8 ++++----
elf/Makefile | 5 ++++-
elf/vismain.c | 5 +++++
4 files changed, 21 insertions(+), 5 deletions(-)
hooks/post-receive
--
GNU C Library master sources