This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch hjl/pr17711 created. glibc-2.20-531-g084fe86
- From: hjl at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 13 Jan 2015 14:23:31 -0000
- Subject: GNU C Library master sources branch hjl/pr17711 created. glibc-2.20-531-g084fe86
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, hjl/pr17711 has been created
at 084fe86b6618cc647f888dcbaf0a6f9c2222ec13 (commit)
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=084fe86b6618cc647f888dcbaf0a6f9c2222ec13
commit 084fe86b6618cc647f888dcbaf0a6f9c2222ec13
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Jan 13 06:19:44 2015 -0800
Compile gcrt1.o with -fPIC
We compile gcrt1.o with -fPIC to support both "gcc -pg" and "gcc -pie -pg".
[BZ #17836]
* csu/Makefile (extra-objs): Add gmon-start.o if not builing
shared library. Add gmon-start.os otherwise.
($(objpfx)g$(start-installed-name)): Use $(objpfx)S%
$(objpfx)gmon-start.os if builing shared library.
($(objpfx)g$(static-start-installed-name)): Likewise.
diff --git a/csu/Makefile b/csu/Makefile
index f7cf4af..9f0855a 100644
--- a/csu/Makefile
+++ b/csu/Makefile
@@ -32,7 +32,7 @@ aux = errno
elide-routines.os = libc-tls
static-only-routines = elf-init
csu-dummies = $(filter-out $(start-installed-name),crt1.o Mcrt1.o)
-extra-objs = start.o gmon-start.o \
+extra-objs = start.o \
$(start-installed-name) g$(start-installed-name) $(csu-dummies) \
S$(start-installed-name)
omit-deps = $(patsubst %.o,%,$(start-installed-name) g$(start-installed-name) \
@@ -46,9 +46,11 @@ tests := tst-empty tst-atomic tst-atomic-long
tests-static := tst-empty
ifeq (yes,$(build-shared))
-extra-objs += S$(start-installed-name)
+extra-objs += S$(start-installed-name) gmon-start.os
install-lib += S$(start-installed-name)
generated += start.os
+else
+extra-objs += gmon-start.o
endif
ifneq ($(start-installed-name),$(static-start-installed-name))
@@ -95,10 +97,17 @@ endif
# The profiling startfile is made by linking together the normal
# startfile with gmon-start.o, which defines a constructor function
# to turn on profiling code at startup.
+ifeq (yes,$(build-shared))
+$(addprefix $(objpfx),$(sort g$(start-installed-name) \
+ g$(static-start-installed-name))): \
+ $(objpfx)g%: $(objpfx)S% $(objpfx)gmon-start.os
+ $(link-relocatable)
+else
$(addprefix $(objpfx),$(sort g$(start-installed-name) \
g$(static-start-installed-name))): \
$(objpfx)g%: $(objpfx)% $(objpfx)gmon-start.o
$(link-relocatable)
+endif
# These extra files are sometimes expected by system standard linking
# procedures, but we have nothing for them to do. So compile empty files.
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=70d384a2301bcb2702a3e32e23a04c178c667986
commit 70d384a2301bcb2702a3e32e23a04c178c667986
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Fri Dec 19 06:30:31 2014 -0800
Compile vismain with -fPIC and link with -pie
diff --git a/elf/Makefile b/elf/Makefile
index e5b142c..02ab9d9 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 = $(pic-ccflag)
endif
modules-execstack-yes = tst-execstack-mod
extra-test-objs += $(addsuffix .os,$(strip $(modules-names)))
-----------------------------------------------------------------------
hooks/post-receive
--
GNU C Library master sources