diff options
author | Mark Rutland <mark.rutland@arm.com> | 2021-07-29 12:42:01 +0100 |
---|---|---|
committer | Mark Rutland <mark.rutland@arm.com> | 2021-08-02 15:27:57 +0100 |
commit | 0d024605dd2e831c9adb76799c44700e37c37cca (patch) | |
tree | b17746e442d4b1e7f37bbdf4dbcc45900658f8f8 | |
parent | c1a09cc66c1efe18f06f924609f8798d328af2bc (diff) | |
download | boot-wrapper-aarch64-0d024605dd2e831c9adb76799c44700e37c37cca.tar.gz |
Output text separately from data
Assembly files generally assume that .text is word-aligned, and don't
explciitly align the .text section. However, if we mix .text with data
sections at link time, we can output .text sections at less than word
alignment, resulting in boot-time hangs that are painful to debug.
Output all .text sections before .data sections to minimize this risk.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
-rw-r--r-- | model.lds.S | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/model.lds.S b/model.lds.S index 370ff56..d4e7e13 100644 --- a/model.lds.S +++ b/model.lds.S @@ -65,7 +65,8 @@ SECTIONS .boot PHYS_OFFSET: { *(.init) - *(.text* .data* .rodata* .bss* COMMON) + *(.text*) + *(.data* .rodata* .bss* COMMON) *(.vectors) *(.stack) PROVIDE(etext = .); |