summaryrefslogtreecommitdiff
path: root/bl2
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-06-14 17:49:17 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-06-14 20:56:52 +0900
commit2f6f00dc89a31d9a9fa4a8917c9c5101ba9a8278 (patch)
tree5e116353a929c02c57db1f34989dd29676ceade2 /bl2
parentdc593ddc07fc942fd1c43106b7783550a8ad6714 (diff)
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: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'bl2')
-rw-r--r--bl2/bl2_el3.ld.S19
1 files changed, 3 insertions, 16 deletions
diff --git a/bl2/bl2_el3.ld.S b/bl2/bl2_el3.ld.S
index af93a0ce..82b51a86 100644
--- a/bl2/bl2_el3.ld.S
+++ b/bl2/bl2_el3.ld.S
@@ -21,6 +21,9 @@ MEMORY {
#endif
}
+#if !BL2_IN_XIP_MEM
+#define ROM RAM
+#endif
SECTIONS
{
@@ -45,11 +48,7 @@ SECTIONS
*(.vectors)
. = ALIGN(PAGE_SIZE);
__TEXT_END__ = .;
-#if BL2_IN_XIP_MEM
} >ROM
-#else
- } >RAM
-#endif
.rodata . : {
__RODATA_START__ = .;
@@ -72,11 +71,7 @@ SECTIONS
. = ALIGN(PAGE_SIZE);
__RODATA_END__ = .;
-#if BL2_IN_XIP_MEM
} >ROM
-#else
- } >RAM
-#endif
ASSERT(__TEXT_RESIDENT_END__ - __TEXT_RESIDENT_START__ <= PAGE_SIZE,
"Resident part of BL2 has exceeded its limit.")
@@ -115,11 +110,7 @@ SECTIONS
. = ALIGN(PAGE_SIZE);
__RO_END__ = .;
-#if BL2_IN_XIP_MEM
} >ROM
-#else
- } >RAM
-#endif
#endif
ASSERT(__CPU_OPS_END__ > __CPU_OPS_START__,
@@ -146,11 +137,7 @@ SECTIONS
__DATA_RAM_START__ = .;
*(.data*)
__DATA_RAM_END__ = .;
-#if BL2_IN_XIP_MEM
} >RAM AT>ROM
-#else
- } >RAM
-#endif
stacks (NOLOAD) : {
__STACKS_START__ = .;