From 51ce75b5b02a7617bfee5272d9236835be48d02d Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Sat, 13 Oct 2007 14:50:43 +0000 Subject: - use the compiler-driver instead of the linker - adjust setting flags accordingly to use (hardcoded, see below) -Wl, Potential improvements: *) --warn-unresolved-symbols should perhaps be used for all libs *) eventually rename LDFLAGS to CC_LDFLAGS *) probe for compiler driver's notion of flag to use for passing in linker flags (i.e. don't hardcode "-Wl,") --- ldso/ldso/Makefile.in | 4 ++-- ldso/libdl/Makefile.in | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'ldso') diff --git a/ldso/ldso/Makefile.in b/ldso/ldso/Makefile.in index 04c4f2c99..8ae7a1743 100644 --- a/ldso/ldso/Makefile.in +++ b/ldso/ldso/Makefile.in @@ -20,9 +20,9 @@ CFLAGS-ldso.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\" ifneq ($(SUPPORT_LD_DEBUG),y) LDFLAGS-$(UCLIBC_LDSO_NAME).so := $(LDFLAGS) else -LDFLAGS-$(UCLIBC_LDSO_NAME).so := $(LDFLAGS_NOSTRIP) -z defs +LDFLAGS-$(UCLIBC_LDSO_NAME).so := $(LDFLAGS_NOSTRIP) -Wl,-z,defs endif -LDFLAGS-$(UCLIBC_LDSO_NAME).so += -e _start -z now -Bsymbolic --export-dynamic --sort-common --discard-locals --discard-all --no-undefined +LDFLAGS-$(UCLIBC_LDSO_NAME).so += -Wl,-e,_start -Wl,-z,now -Wl,-Bsymbolic -Wl,--export-dynamic -Wl,--sort-common -Wl,--discard-locals -Wl,--discard-all -Wl,--no-undefined ldso_FULL_NAME := $(UCLIBC_LDSO_NAME)-$(VERSION).so diff --git a/ldso/libdl/Makefile.in b/ldso/libdl/Makefile.in index f187f063a..baacf7654 100644 --- a/ldso/libdl/Makefile.in +++ b/ldso/libdl/Makefile.in @@ -17,7 +17,7 @@ endif CFLAGS-libdl.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\" -LDFLAGS-libdl.so := $(LDFLAGS) -fini dl_cleanup +LDFLAGS-libdl.so := $(LDFLAGS) -Wl,-fini,dl_cleanup LIBS-libdl.so := $(LIBS) $(ldso) -- cgit v1.2.3