diff options
| author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2009-10-09 18:10:50 +0200 |
|---|---|---|
| committer | Austin Foxley <austinf@cetoncorp.com> | 2009-10-16 11:43:36 -0700 |
| commit | 0a013fe8f69546b99d73876852cf284dd0dde474 (patch) | |
| tree | 1acd7674cc46198cdd56f91c2050c6aaa9406d3d | |
| parent | cf61735a46681368a875da6eac8f1ed89f6eddc6 (diff) | |
| download | uClibc-alpine-0a013fe8f69546b99d73876852cf284dd0dde474.tar.bz2 uClibc-alpine-0a013fe8f69546b99d73876852cf284dd0dde474.tar.xz | |
check_ld some more flags
gold does not currently implement these.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| -rw-r--r-- | Rules.mak | 7 | ||||
| -rw-r--r-- | ldso/ldso/Makefile.in | 2 |
2 files changed, 6 insertions, 3 deletions
@@ -282,7 +282,7 @@ endif # Idx Name Size VMA LMA File off Algn # 0 .text xxxxxxxx 00000000 00000000 xxxxxxxx 2**2 <===! CPU_CFLAGS-y += $(call check_gcc,-ffunction-sections -fdata-sections,) -ifneq ($(call check_ld,--sort-common,),) +ifneq ($(call check_ld,--sort-common),) CPU_LDFLAGS-y += -Wl,--sort-common endif ifneq ($(call check_ld,--sort-section alignment),) @@ -547,8 +547,11 @@ ifneq ($(HAVE_SHARED),y) CFLAGS += -DSTATIC endif +LDFLAG_WARN_ONCE:=$(if $(call check_ld,--warn-once),-Wl$(comma)--warn-once) +LDFLAG_SORT_COMMON:=$(if $(call check_ld,--sort-common),-Wl$(comma)--sort-common) +LDFLAG_DISCARD_ALL:=$(if $(call check_ld,--discard-all),-Wl$(comma)--discard-all) LDFLAGS_NOSTRIP:=$(CPU_LDFLAGS-y) -shared \ - -Wl,--warn-common -Wl,--warn-once -Wl,-z,combreloc + -Wl,--warn-common $(LDFLAG_WARN_ONCE) -Wl,-z,combreloc # binutils-2.16.1 warns about ignored sections, 2.16.91.0.3 and newer are ok #LDFLAGS_NOSTRIP+=$(call check_ld,--gc-sections) diff --git a/ldso/ldso/Makefile.in b/ldso/ldso/Makefile.in index 350cc8108..9e228b7a0 100644 --- a/ldso/ldso/Makefile.in +++ b/ldso/ldso/Makefile.in @@ -35,7 +35,7 @@ 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,_start -Wl,-z,now -Wl,-Bsymbolic -Wl,--export-dynamic -Wl,--sort-common -Wl,--discard-locals -Wl,--discard-all -Wl,--no-undefined +LDFLAGS-$(UCLIBC_LDSO_NAME).so += -Wl,-e,_start -Wl,-z,now -Wl,-Bsymbolic -Wl,--export-dynamic $(LDFLAG_SORT_COMMON) -Wl,--discard-locals $(LDFLAG_DISCARD_ALL) -Wl,--no-undefined ldso_FULL_NAME := $(UCLIBC_LDSO_NAME)-$(VERSION).so |
