Browse Source
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>pull/1938/head
Masahiro Yamada
5 years ago
9 changed files with 42 additions and 77 deletions
@ -0,0 +1,21 @@ |
|||
/*
|
|||
* Copyright (c) 2020, ARM Limited and Contributors. All rights reserved. |
|||
* |
|||
* SPDX-License-Identifier: BSD-3-Clause |
|||
*/ |
|||
|
|||
#ifndef BL_COMMON_LD_H |
|||
#define BL_COMMON_LD_H |
|||
|
|||
/*
|
|||
* 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. |
|||
*/ |
|||
#define XLAT_TABLE_SECTION \ |
|||
xlat_table (NOLOAD) : { \ |
|||
*(xlat_table) \ |
|||
} |
|||
|
|||
#endif /* BL_COMMON_LD_H */ |
Loading…
Reference in new issue