summaryrefslogtreecommitdiff
path: root/ldso
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2015-04-14 23:58:41 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2015-04-14 23:58:41 +0200
commit1df50b08dfe4133d306156483a224f5a478f7dff (patch)
tree7756c09e562a7ef8cd084ef608f0d17a21d88a6a /ldso
parentf820f4ce071ae0985d84e09ea74dc42d55081e86 (diff)
prelink: handle _begin in a gold-agnostic way
The nostartfiles is redundant but better be safe Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'ldso')
-rw-r--r--ldso/ldso/Makefile.in13
1 files changed, 4 insertions, 9 deletions
diff --git a/ldso/ldso/Makefile.in b/ldso/ldso/Makefile.in
index 815264291..9b04d619f 100644
--- a/ldso/ldso/Makefile.in
+++ b/ldso/ldso/Makefile.in
@@ -33,10 +33,13 @@ LDFLAGS-$(UCLIBC_LDSO_NAME).so := $(LDFLAGS)
else
LDFLAGS-$(UCLIBC_LDSO_NAME).so := $(LDFLAGS_NOSTRIP) -Wl,-z,defs
endif
-LDFLAGS-$(UCLIBC_LDSO_NAME).so += -Wl,-e,$(SYMBOL_PREFIX)_start -Wl,-z,now -Wl,-Bsymbolic \
+LDFLAGS-$(UCLIBC_LDSO_NAME).so += -Wl,-e,$(SYMBOL_PREFIX)_start \
+ -Wl,-z,now -Wl,-Bsymbolic \
-Wl,--export-dynamic $(CFLAG_-Wl--sort-common) -Wl,--discard-locals \
$(CFLAG_-Wl--discard-all) -Wl,--no-undefined
+LDFLAGS-$(LDSO_PRELINK_SUPPORT)-$(UCLIBC_LDSO_NAME).so += -Wl,-defsym=$(SYMBOL_PREFIX)_begin=0
+
ldso_FULL_NAME := $(UCLIBC_LDSO_NAME)-$(VERSION).so
$(UCLIBC_LDSO_NAME)_DIR := $(top_srcdir)ldso/ldso
@@ -62,17 +65,9 @@ ldso-y := $($(UCLIBC_LDSO_NAME)_OBJS:.o=.oS)
lib-so-y += $(ldso)
objclean-y += CLEAN_ldso/ldso
-ifeq ($(LDSO_PRELINK_SUPPORT),y)
-# Use a specific linker script for ld.so
-LDFLAGS-$(UCLIBC_LDSO_NAME).so += -T $(ldso:.$(ABI_VERSION)=).lds
-endif
-
$(ldso): $(ldso:.$(ABI_VERSION)=)
$(ldso:.$(ABI_VERSION)=): | $(top_builddir)lib
$(ldso:.$(ABI_VERSION)=): $($(UCLIBC_LDSO_NAME)_OUT)/$(UCLIBC_LDSO_NAME)_so.a
-ifeq ($(LDSO_PRELINK_SUPPORT),y)
- $(call create-lds)
-endif
$(call link.so,$(ldso_FULL_NAME),$(ABI_VERSION))
$($(UCLIBC_LDSO_NAME)_OUT)/$(UCLIBC_LDSO_NAME)_so.a: $(ldso-y)