sh: define entry point and reloc_dst inside a linker script
authorVladimir Zapolskiy <vz@mleia.com>
Sun, 27 Nov 2016 22:15:27 +0000 (00:15 +0200)
committerTom Rini <trini@konsulko.com>
Sat, 3 Dec 2016 02:32:48 +0000 (21:32 -0500)
No functional change, concentrate linker script commands in one
place for convenience. Entry point is set to CONFIG_SYS_TEXT_BASE by
default on build, so this option can be omitted from being added to
the linker script.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/sh/config.mk
arch/sh/cpu/u-boot.lds

index 0578fa3fd81254c8fb968962e2b199b174fdad31..673ed8dfa48a63350ec4682d7b46df7661f33f23 100644 (file)
@@ -15,6 +15,5 @@ CONFIG_STANDALONE_LOAD_ADDR += -EB
 endif
 
 PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__
-PLATFORM_LDFLAGS += -e $(CONFIG_SYS_TEXT_BASE) --defsym reloc_dst=$(CONFIG_SYS_TEXT_BASE)
 LDFLAGS_FINAL = --gc-sections
 PLATFORM_RELFLAGS += -ffixed-r13
index e90ac06c3707760d44cb08ed78fa42063eab8712..bc240bd1bd5c28da4a73694b783d4c2a921f0dc6 100644 (file)
@@ -19,10 +19,7 @@ ENTRY(_start)
 
 SECTIONS
 {
-       /*
-        * entry and reloct_dst will be provided via ldflags
-        */
-       . = .;
+       reloc_dst = .;
 
        PROVIDE (_ftext = .);
        PROVIDE (_fcode = .);
@@ -73,7 +70,6 @@ SECTIONS
 
        PROVIDE (__init_end = .);
        PROVIDE (reloc_dst_end = .);
-       /* _reloc_dst_end = .; */
 
        PROVIDE (bss_start = .);
        PROVIDE (__bss_start = .);