Commit 2f6f00dc authored by Masahiro Yamada's avatar Masahiro Yamada
Browse files

bl2_el3: clean up linker script



This linker script is so unreadable due to sprinkled #ifdef.

Direct read-only data to 'ROM' and read-write data to 'RAM'.

Both go to the same memory device when BL2_IN_XIP_MEM is disabled.

Change-Id: Ieeac3f1a4e05e9e8599de2ec84260819c70f361e
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent dc593ddc
...@@ -21,6 +21,9 @@ MEMORY { ...@@ -21,6 +21,9 @@ MEMORY {
#endif #endif
} }
#if !BL2_IN_XIP_MEM
#define ROM RAM
#endif
SECTIONS SECTIONS
{ {
...@@ -45,11 +48,7 @@ SECTIONS ...@@ -45,11 +48,7 @@ SECTIONS
*(.vectors) *(.vectors)
. = ALIGN(PAGE_SIZE); . = ALIGN(PAGE_SIZE);
__TEXT_END__ = .; __TEXT_END__ = .;
#if BL2_IN_XIP_MEM
} >ROM } >ROM
#else
} >RAM
#endif
.rodata . : { .rodata . : {
__RODATA_START__ = .; __RODATA_START__ = .;
...@@ -72,11 +71,7 @@ SECTIONS ...@@ -72,11 +71,7 @@ SECTIONS
. = ALIGN(PAGE_SIZE); . = ALIGN(PAGE_SIZE);
__RODATA_END__ = .; __RODATA_END__ = .;
#if BL2_IN_XIP_MEM
} >ROM } >ROM
#else
} >RAM
#endif
ASSERT(__TEXT_RESIDENT_END__ - __TEXT_RESIDENT_START__ <= PAGE_SIZE, ASSERT(__TEXT_RESIDENT_END__ - __TEXT_RESIDENT_START__ <= PAGE_SIZE,
"Resident part of BL2 has exceeded its limit.") "Resident part of BL2 has exceeded its limit.")
...@@ -115,11 +110,7 @@ SECTIONS ...@@ -115,11 +110,7 @@ SECTIONS
. = ALIGN(PAGE_SIZE); . = ALIGN(PAGE_SIZE);
__RO_END__ = .; __RO_END__ = .;
#if BL2_IN_XIP_MEM
} >ROM } >ROM
#else
} >RAM
#endif
#endif #endif
ASSERT(__CPU_OPS_END__ > __CPU_OPS_START__, ASSERT(__CPU_OPS_END__ > __CPU_OPS_START__,
...@@ -146,11 +137,7 @@ SECTIONS ...@@ -146,11 +137,7 @@ SECTIONS
__DATA_RAM_START__ = .; __DATA_RAM_START__ = .;
*(.data*) *(.data*)
__DATA_RAM_END__ = .; __DATA_RAM_END__ = .;
#if BL2_IN_XIP_MEM
} >RAM AT>ROM } >RAM AT>ROM
#else
} >RAM
#endif
stacks (NOLOAD) : { stacks (NOLOAD) : {
__STACKS_START__ = .; __STACKS_START__ = .;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment