From 07c4c069475fec43bd99e021afb3839d7b27fd5a Mon Sep 17 00:00:00 2001 From: Christian Eggers Date: Mon, 27 Jan 2020 14:30:43 +0100 Subject: images: Use separate LDFLAGS for PBL When setting CONFIG_PBL_RELOCATABLE=y (selected by PBL_MULTI_IMAGES) and CONFIG_RELOCATABLE=n (trying to reduce image size), the PBL is also linked with "-static" instead of "-pie". The result is a non-working PBL. As a side effect, also get rid of erroneous "-Map barebox.map" when linking the PBL. Only changed for ARM, are any other platforms affected? Signed-off-by: Christian Eggers Signed-off-by: Sascha Hauer --- images/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'images/Makefile') diff --git a/images/Makefile b/images/Makefile index 34b7a56101..650baf170f 100644 --- a/images/Makefile +++ b/images/Makefile @@ -54,7 +54,7 @@ $(pbl-lds): $(obj)/../arch/$(ARCH)/lib/pbl.lds.S FORCE $(call if_changed_dep,cpp_lds_S) quiet_cmd_elf__ ?= LD $@ - cmd_elf__ ?= $(LD) $(LDFLAGS_barebox) --gc-sections \ + cmd_elf__ ?= $(LD) $(LDFLAGS_pbl) --gc-sections \ -e $(2) -Map $@.map $(LDFLAGS_$(@F)) -o $@ \ -T $(pbl-lds) \ --start-group $(barebox-pbl-common) $(obj)/piggy.o \ -- cgit v1.2.3