diff mbox

[U-Boot,RESEND,15/24] sh: define entry point and reloc_dst inside a linker script

Message ID 20161127221536.9577-16-vz@mleia.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Vladimir Zapolskiy Nov. 27, 2016, 10:15 p.m. UTC
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>
---
 arch/sh/config.mk      | 1 -
 arch/sh/cpu/u-boot.lds | 6 +-----
 2 files changed, 1 insertion(+), 6 deletions(-)

Comments

Simon Glass Nov. 30, 2016, 12:33 a.m. UTC | #1
On 27 November 2016 at 15:15, Vladimir Zapolskiy <vz@mleia.com> wrote:
> 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>
> ---
>  arch/sh/config.mk      | 1 -
>  arch/sh/cpu/u-boot.lds | 6 +-----
>  2 files changed, 1 insertion(+), 6 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini Dec. 4, 2016, 12:39 a.m. UTC | #2
On Mon, Nov 28, 2016 at 12:15:27AM +0200, Vladimir Zapolskiy wrote:

> 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>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/arch/sh/config.mk b/arch/sh/config.mk
index 0578fa3..673ed8d 100644
--- a/arch/sh/config.mk
+++ b/arch/sh/config.mk
@@ -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
diff --git a/arch/sh/cpu/u-boot.lds b/arch/sh/cpu/u-boot.lds
index e90ac06..bc240bd 100644
--- a/arch/sh/cpu/u-boot.lds
+++ b/arch/sh/cpu/u-boot.lds
@@ -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 = .);