diff options
author | Yi Chou <yich@google.com> | 2023-11-18 12:12:01 +0800 |
---|---|---|
committer | Julius Werner <jwerner@chromium.org> | 2023-12-01 02:20:29 +0000 |
commit | 32ea2abe3b32ca5c649b98926b7b3e00c398036e (patch) | |
tree | 457989d2c5a1e45a0016a7a955f7b2ca161d697f /payloads/libpayload/arch/arm64 | |
parent | 1397fd3668c73b940253e5f5a5f81dea54383660 (diff) |
libpayload: Fix the stack and data labels
We should make sure _stack/_estack and the other labels are consistent.
And _data & _edata is also useful to clean up the sensitive data on the
data section.
BUG=b:248610274
TEST=emerge-cherry libpayload
BRANCH=none
Cq-Depend: chromium:5052462
Change-Id: I589040f4db60b35813ea9f4ba9503244bd7def00
Signed-off-by: Yi Chou <yich@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79144
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'payloads/libpayload/arch/arm64')
-rw-r--r-- | payloads/libpayload/arch/arm64/head.S | 2 | ||||
-rw-r--r-- | payloads/libpayload/arch/arm64/libpayload.ldscript | 14 |
2 files changed, 11 insertions, 5 deletions
diff --git a/payloads/libpayload/arch/arm64/head.S b/payloads/libpayload/arch/arm64/head.S index 0b26fe5bce..0ebadeae34 100644 --- a/payloads/libpayload/arch/arm64/head.S +++ b/payloads/libpayload/arch/arm64/head.S @@ -55,4 +55,4 @@ ENDPROC(_entry) 1: .quad cb_header_ptr 2: -.quad _stack +.quad _estack diff --git a/payloads/libpayload/arch/arm64/libpayload.ldscript b/payloads/libpayload/arch/arm64/libpayload.ldscript index e225aa8bca..c9881f7ec0 100644 --- a/payloads/libpayload/arch/arm64/libpayload.ldscript +++ b/payloads/libpayload/arch/arm64/libpayload.ldscript @@ -40,31 +40,37 @@ SECTIONS _start = .; .text : { + _text = .; *(.text._entry) *(.text) *(.text.*) + _etext = .; } .rodata : { + _rodata = .; *(.rodata) *(.rodata.*) + _erodata = .; } .data : { + _data = .; *(.data) *(.data.*) + _edata = .; } - _edata = .; - .bss : { *(.ttb_buffer) + _bss = .; *(.sbss) *(.sbss.*) *(.bss) *(.bss.*) *(COMMON) + _ebss = .; /* Stack and heap */ @@ -74,10 +80,10 @@ SECTIONS . = ALIGN(16); _eheap = .; - _estack = .; + _stack = .; . += CONFIG_LP_STACK_SIZE; . = ALIGN(16); - _stack = .; + _estack = .; } _end = .; |