Skip to content
Snippets Groups Projects
Commit b26d2507 authored by Vladimir Zapolskiy's avatar Vladimir Zapolskiy Committed by Tom Rini
Browse files

sh: define entry point and reloc_dst inside a linker script


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: default avatarVladimir Zapolskiy <vz@mleia.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 9ec4a67e
No related branches found
No related tags found
No related merge requests found
...@@ -15,6 +15,5 @@ CONFIG_STANDALONE_LOAD_ADDR += -EB ...@@ -15,6 +15,5 @@ CONFIG_STANDALONE_LOAD_ADDR += -EB
endif endif
PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__ PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__
PLATFORM_LDFLAGS += -e $(CONFIG_SYS_TEXT_BASE) --defsym reloc_dst=$(CONFIG_SYS_TEXT_BASE)
LDFLAGS_FINAL = --gc-sections LDFLAGS_FINAL = --gc-sections
PLATFORM_RELFLAGS += -ffixed-r13 PLATFORM_RELFLAGS += -ffixed-r13
...@@ -19,10 +19,7 @@ ENTRY(_start) ...@@ -19,10 +19,7 @@ ENTRY(_start)
SECTIONS SECTIONS
{ {
/* reloc_dst = .;
* entry and reloct_dst will be provided via ldflags
*/
. = .;
PROVIDE (_ftext = .); PROVIDE (_ftext = .);
PROVIDE (_fcode = .); PROVIDE (_fcode = .);
...@@ -73,7 +70,6 @@ SECTIONS ...@@ -73,7 +70,6 @@ SECTIONS
PROVIDE (__init_end = .); PROVIDE (__init_end = .);
PROVIDE (reloc_dst_end = .); PROVIDE (reloc_dst_end = .);
/* _reloc_dst_end = .; */
PROVIDE (bss_start = .); PROVIDE (bss_start = .);
PROVIDE (__bss_start = .); PROVIDE (__bss_start = .);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment