Skip to content

Commit

Permalink
tests/tcg/aarch64: Improve linker script organization
Browse files Browse the repository at this point in the history
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>
Message-Id: <20240910173900.4154726-10-alex.bennee@linaro.org>
  • Loading branch information
gromero authored and stsquad committed Sep 10, 2024
1 parent 3848409 commit f0ef6c3
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tests/tcg/aarch64/system/kernel.ld
Original file line number Diff line number Diff line change
@@ -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)
}
Expand Down

0 comments on commit f0ef6c3

Please sign in to comment.