summaryrefslogtreecommitdiff
path: root/bl1
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2020-03-09 17:39:48 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2020-03-11 11:31:46 +0900
commit665e71b8ea28162ec7737c1411bca3ea89e5957e (patch)
tree3191e7a78a9bdc638086f1ec032f101ed5d797ff /bl1
parente28224583e86bebf39375b327995c9333f6b7966 (diff)
downloadarm-trusted-firmware-665e71b8ea28162ec7737c1411bca3ea89e5957e.tar.gz
Factor xlat_table sections in linker scripts out into a header file
TF-A has so many linker scripts, at least one linker script for each BL image, and some platforms have their own ones. They duplicate quite similar code (and comments). When we add some changes to linker scripts, we end up with touching so many files. This is not nice in the maintainability perspective. When you look at Linux kernel, the common code is macrofied in include/asm-generic/vmlinux.lds.h, which is included from each arch linker script, arch/*/kernel/vmlinux.lds.S TF-A can follow this approach. Let's factor out the common code into include/common/bl_common.ld.h As a start point, this commit factors out the xlat_table section. Change-Id: Ifa369e9b48e8e12702535d721cc2a16d12397895 Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'bl1')
-rw-r--r--bl1/bl1.ld.S13
1 files changed, 3 insertions, 10 deletions
diff --git a/bl1/bl1.ld.S b/bl1/bl1.ld.S
index b20859b5b..e65ab9004 100644
--- a/bl1/bl1.ld.S
+++ b/bl1/bl1.ld.S
@@ -1,11 +1,12 @@
/*
- * Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2013-2020, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <platform_def.h>
+#include <common/bl_common.ld.h>
#include <lib/xlat_tables/xlat_tables_defs.h>
OUTPUT_FORMAT(PLATFORM_LINKER_FORMAT)
@@ -148,15 +149,7 @@ SECTIONS
__BSS_END__ = .;
} >RAM
- /*
- * The xlat_table section is for full, aligned page tables (4K).
- * Removing them from .bss avoids forcing 4K alignment on
- * the .bss section. The tables are initialized to zero by the translation
- * tables library.
- */
- xlat_table (NOLOAD) : {
- *(xlat_table)
- } >RAM
+ XLAT_TABLE_SECTION >RAM
#if USE_COHERENT_MEM
/*