diff --git a/Makefile b/Makefile index 3b8d73d..da65a1a 100644 --- a/Makefile +++ b/Makefile @@ -321,6 +321,7 @@ export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS export CFLAGS CFLAGS_KERNEL export AFLAGS AFLAGS_KERNEL +export LDFLAGS_barebox # Files to ignore in find ... statements diff --git a/images/Makefile b/images/Makefile index 3f48267..705c8ad 100644 --- a/images/Makefile +++ b/images/Makefile @@ -53,11 +53,8 @@ $(pbl-lds): $(obj)/../arch/$(ARCH)/lib/pbl.lds.S FORCE $(call if_changed_dep,cpp_lds_S) -# Avoid 'Not enough room for program headers' error on binutils 2.28 onwards. -LDFLAGS += $(call ld-option, --no-dynamic-linker) - quiet_cmd_elf__ ?= LD $@ - cmd_elf__ ?= $(LD) $(LDFLAGS) --gc-sections -pie \ + cmd_elf__ ?= $(LD) $(LDFLAGS_barebox) --gc-sections -pie \ -e $(2) -Map $@.map $(LDFLAGS_$(@F)) -o $@ \ -T $(pbl-lds) \ --start-group $(barebox-pbl-common) --end-group