summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2015-03-11 22:59:51 +0100
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2015-03-12 14:20:57 +0100
commit8c66e0a6c7987cda9df8c88e84b3d50d573c1dbb (patch)
tree6bbecd3d74f7f8c328ff496690355e7a58b39e2b
parentc3ddc18409b71db9e2fc863a7ff94a89b3c316ce (diff)
buildsys: create linker script with proper flags
We were not passing the correct use-ld and -m{32,64,...} when creating the linker script. Revisit for gold later on anyway. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
-rw-r--r--Makerules7
1 files changed, 4 insertions, 3 deletions
diff --git a/Makerules b/Makerules
index 1596988d2..cc543889c 100644
--- a/Makerules
+++ b/Makerules
@@ -326,9 +326,10 @@ cmd_hcompile.o = $(HOSTCC) $(filter-out $(PHONY),$<) $(DEPS-$(notdir $@)) -c -o
define create-lds
$(Q)$(RM) $@.lds
- $(Q)$(CC) -nostdlib -nostartfiles -shared -Wl,-z,combreloc \
- -Wl,-z,relro -Wl,--hash-style=gnu -Wl,-z,defs \
- -Wl,--verbose 2>&1 | LC_ALL=C \
+ $(Q)$(CC) $(LDFLAG-fuse-ld) $(CPU_LDFLAGS-y) \
+ -nostdlib -nostartfiles -shared -Wl,-z,combreloc \
+ -Wl,-z,relro $(CFLAG_-Wl--hash-style=gnu) -Wl,-z,defs \
+ -x c /dev/null -Wl,--verbose 2>&1 | LC_ALL=C \
$(SED) -e '/^=========/,/^=========/!d;/^=========/d' \
-e 's/^\([ ]*\)\. = .* + SIZEOF_HEADERS;/&\n\1$(SYMBOL_PREFIX)_begin = . - SIZEOF_HEADERS;/' > $@.lds
endef