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>
This commit is contained in:
@@ -40,29 +40,35 @@ SECTIONS
|
||||
_start = .;
|
||||
|
||||
.text : {
|
||||
_text = .;
|
||||
*(.text._entry)
|
||||
*(.text)
|
||||
*(.text.*)
|
||||
_etext = .;
|
||||
}
|
||||
|
||||
.rodata : {
|
||||
_rodata = .;
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
_erodata = .;
|
||||
}
|
||||
|
||||
.data : {
|
||||
_data = .;
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
_edata = .;
|
||||
}
|
||||
|
||||
_edata = .;
|
||||
|
||||
.bss : {
|
||||
_bss = .;
|
||||
*(.sbss)
|
||||
*(.sbss.*)
|
||||
*(.bss)
|
||||
*(.bss.*)
|
||||
*(COMMON)
|
||||
_ebss = .;
|
||||
|
||||
/* Stack and heap */
|
||||
|
||||
@@ -72,10 +78,10 @@ SECTIONS
|
||||
. = ALIGN(16);
|
||||
_eheap = .;
|
||||
|
||||
_estack = .;
|
||||
_stack = .;
|
||||
. += CONFIG_LP_STACK_SIZE;
|
||||
. = ALIGN(16);
|
||||
_stack = .;
|
||||
_estack = .;
|
||||
}
|
||||
|
||||
_end = .;
|
||||
|
Reference in New Issue
Block a user