Skip to content

Commit

Permalink
sh: define entry point and reloc_dst inside a linker script
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
  • Loading branch information
vzapolskiy authored and trini committed Dec 3, 2016
1 parent 9ec4a67 commit b26d250
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion arch/sh/config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 1 addition & 5 deletions arch/sh/cpu/u-boot.lds
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ ENTRY(_start)

SECTIONS
{
/*
* entry and reloct_dst will be provided via ldflags
*/
. = .;
reloc_dst = .;

PROVIDE (_ftext = .);
PROVIDE (_fcode = .);
Expand Down Expand Up @@ -73,7 +70,6 @@ SECTIONS

PROVIDE (__init_end = .);
PROVIDE (reloc_dst_end = .);
/* _reloc_dst_end = .; */

PROVIDE (bss_start = .);
PROVIDE (__bss_start = .);
Expand Down

0 comments on commit b26d250

Please sign in to comment.