[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 08/26] tests/tcg/aarch64: Improve linker script organization
From: |
Alex Bennée |
Subject: |
[PATCH 08/26] tests/tcg/aarch64: Improve linker script organization |
Date: |
Tue, 10 Sep 2024 15:07:15 +0100 |
From: Gustavo Romero <gustavo.romero@linaro.org>
Improve kernel.ld linker script organization by using MEMORY command.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Message-Id: <20240906143316.657436-5-gustavo.romero@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
tests/tcg/aarch64/system/kernel.ld | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/tests/tcg/aarch64/system/kernel.ld
b/tests/tcg/aarch64/system/kernel.ld
index 7b3a76dcbf..5f39258d32 100644
--- a/tests/tcg/aarch64/system/kernel.ld
+++ b/tests/tcg/aarch64/system/kernel.ld
@@ -1,23 +1,23 @@
ENTRY(__start)
-SECTIONS
-{
- /* virt machine, RAM starts at 1gb */
- . = (1 << 30);
+MEMORY {
+ /* On virt machine RAM starts at 1 GiB. */
+
+ /* Align text and rodata to the 1st 2 MiB chunk. */
+ TXT (rx) : ORIGIN = 1 << 30, LENGTH = 2M
+ /* Align r/w data to the 2nd 2 MiB chunk. */
+ DAT (rw) : ORIGIN = (1 << 30) + 2M, LENGTH = 2M
+}
+
+SECTIONS {
.text : {
*(.text)
- }
- .rodata : {
*(.rodata)
- }
- /* align r/w section to next 2mb */
- . = ALIGN(1 << 21);
+ } >TXT
.data : {
*(.data)
- }
- .bss : {
*(.bss)
- }
+ } >DAT
/DISCARD/ : {
*(.ARM.attributes)
}
--
2.39.2
- [PATCH 01/26] tests/docker: remove debian-armel-cross, (continued)
- [PATCH 01/26] tests/docker: remove debian-armel-cross, Alex Bennée, 2024/09/10
- [PATCH 04/26] scripts/ci: update the gitlab-runner playbook, Alex Bennée, 2024/09/10
- [PATCH 03/26] docs/devel: fix duplicate line, Alex Bennée, 2024/09/10
- [PATCH 06/26] gdbstub: Add support for MTE in system mode, Alex Bennée, 2024/09/10
- [PATCH 02/26] tests/docker: update debian i686 and mipsel images to bookworm, Alex Bennée, 2024/09/10
- [PATCH 05/26] gdbstub: Use specific MMU index when probing MTE addresses, Alex Bennée, 2024/09/10
- [PATCH 08/26] tests/tcg/aarch64: Improve linker script organization,
Alex Bennée <=
- [PATCH 07/26] tests/guest-debug: Support passing arguments to the GDB test script, Alex Bennée, 2024/09/10
- [PATCH 10/26] contrib/plugins/Makefile: Add a 'distclean' target, Alex Bennée, 2024/09/10
- [PATCH 09/26] tests/tcg/aarch64: Extend MTE gdbstub tests to system mode, Alex Bennée, 2024/09/10
- [PATCH 11/26] deprecation: don't enable TCG plugins by default on 32 bit hosts, Alex Bennée, 2024/09/10
- [PATCH 16/26] tests/tcg: add mechanism to run specific tests with plugins, Alex Bennée, 2024/09/10
- [PATCH 15/26] plugins: extend API to get latest memory value accessed, Alex Bennée, 2024/09/10
- [PATCH 17/26] tests/tcg: allow to check output of plugins, Alex Bennée, 2024/09/10
- [PATCH 14/26] plugins: save value during memory accesses, Alex Bennée, 2024/09/10
- [PATCH 18/26] tests/plugin/mem: add option to print memory accesses, Alex Bennée, 2024/09/10