aboutsummaryrefslogtreecommitdiffstats
path: root/bl1/bl1.ld.S
diff options
context:
space:
mode:
Diffstat (limited to 'bl1/bl1.ld.S')
-rw-r--r--bl1/bl1.ld.S26
1 files changed, 11 insertions, 15 deletions
diff --git a/bl1/bl1.ld.S b/bl1/bl1.ld.S
index 4ebe8a02a..bc23828e4 100644
--- a/bl1/bl1.ld.S
+++ b/bl1/bl1.ld.S
@@ -4,6 +4,14 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
+/*
+ * The .data section gets copied from ROM to RAM at runtime.
+ * Its LMA should be 16-byte aligned to allow efficient copying of 16-bytes
+ * aligned regions in it.
+ * Its VMA must be page-aligned as it marks the first read/write page.
+ */
+#define DATA_ALIGN 16
+
#include <common/bl_common.ld.h>
#include <lib/xlat_tables/xlat_tables_defs.h>
@@ -87,21 +95,9 @@ SECTIONS
ASSERT(BL1_RW_BASE == ALIGN(PAGE_SIZE),
"BL1_RW_BASE address is not aligned on a page boundary.")
- /*
- * The .data section gets copied from ROM to RAM at runtime.
- * Its LMA should be 16-byte aligned to allow efficient copying of 16-bytes
- * aligned regions in it.
- * Its VMA must be page-aligned as it marks the first read/write page.
- *
- * It must be placed at a lower address than the stacks if the stack
- * protector is enabled. Alternatively, the .data.stack_protector_canary
- * section can be placed independently of the main .data section.
- */
- .data . : ALIGN(16) {
- __DATA_RAM_START__ = .;
- *(SORT_BY_ALIGNMENT(.data*))
- __DATA_RAM_END__ = .;
- } >RAM AT>ROM
+ DATA_SECTION >RAM AT>ROM
+ __DATA_RAM_START__ = __DATA_START__;
+ __DATA_RAM_END__ = __DATA_END__;
STACK_SECTION >RAM
BSS_SECTION >RAM