summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2017-04-20 20:36:26 +0200
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2017-05-10 16:16:09 +0200
commit96ee1ada5dce6e193f68a2cd235cb3e8147178ec (patch)
treead2be4e783809882fc4d3679f481f69061f90860 /Makefile
parentd57259b95078accec01e58a63f783010b782ece4 (diff)
u-boot.elf: allow overriding entry symbol
LD gives the following warning when trying to process u-boot-elf.o warning: cannot find entry symbol __start; defaulting to 0000000080010000 According to gnu-libc the entry symbol for mips is __start and not _start: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/mips/dl-machine.h;h=ed47513ccc1d23d23d32ee640053d2f351f3990b;hb=HEAD#l258 Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index d129e16164..fd9d20101e 100644
--- a/Makefile
+++ b/Makefile
@@ -1184,10 +1184,13 @@ u-boot-img-spl-at-end.bin: u-boot.img spl/u-boot-spl.bin FORCE
$(call if_changed,pad_cat)
# Create a new ELF from a raw binary file.
+ifndef PLATFORM_ELFENTRY
+ PLATFORM_ELFENTRY = "_start"
+endif
u-boot.elf: u-boot.bin
@$(OBJCOPY) -I binary $(PLATFORM_ELFFLAGS) $< u-boot-elf.o
@$(LD) u-boot-elf.o -o $@ \
- --defsym=_start=$(CONFIG_SYS_TEXT_BASE) \
+ --defsym=$(PLATFORM_ELFENTRY)=$(CONFIG_SYS_TEXT_BASE) \
-Ttext=$(CONFIG_SYS_TEXT_BASE)
# Rule to link u-boot