summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2009-01-14 16:04:05 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2009-01-14 16:04:05 +0000
commit878366b7e0b77431885e2472907dfe8becc61a9a (patch)
treeb83a3b68ab229c4652f1f7fdb2801e5f0f6651b7
parent8a7b80bbc00ead1837def5074f4c4777e67b90d3 (diff)
downloaduClibc-alpine-878366b7e0b77431885e2472907dfe8becc61a9a.tar.bz2
uClibc-alpine-878366b7e0b77431885e2472907dfe8becc61a9a.tar.xz
- pull 24836:24838 from trunk (2 of psm's small fixes)
-rw-r--r--Makerules2
-rw-r--r--Rules.mak5
2 files changed, 4 insertions, 3 deletions
diff --git a/Makerules b/Makerules
index 9067867b7..d21e6da95 100644
--- a/Makerules
+++ b/Makerules
@@ -313,7 +313,7 @@ $(top_builddir)lib/interp.c: | $(sub_headers)
$(Q)$(INSTALL) -d $(dir $@)
$(Q)echo "/* Force shared libraries to know about the correct library loader */" > $@
$(Q)echo "#include <features.h>" >> $@
- $(Q)echo "const char __dl_ldso__[] __attribute__ ((section " \
+ $(Q)echo "const char __dl_ldso__[] attribute_hidden __attribute__ ((weak)) __attribute__ ((section " \
"(\".interp\"))) =\""$(SHARED_LIB_LOADER_PREFIX)/$(UCLIBC_LDSO)"\";" >> $@
$(interp): $(top_builddir)lib/interp.c
diff --git a/Rules.mak b/Rules.mak
index 160f5ddae..586965d8d 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -426,9 +426,10 @@ export PIEFLAG:=$(call check_gcc,$(PIEFLAG_NAME),$(PICFLAG))
endif
# We need to keep track of both the CC PIE flag (above) as
# well as the LD PIE flag (below) because we can't rely on
-# gcc passing -pie if we used -fPIE
+# gcc passing -pie if we used -fPIE. We need to directly use -pie
+# instead of -Wl,-pie as gcc picks up the wrong startfile/endfile
ifndef LDPIEFLAG
-export LDPIEFLAG:=$(shell $(LD) --help 2>/dev/null | grep -q -- -pie && echo "-Wl,-pie")
+export LDPIEFLAG:=$(shell $(LD) --help 2>/dev/null | grep -q -- -pie && echo "-pie")
endif
# Check for AS_NEEDED support in linker script (binutils>=2.16.1 has it)