summaryrefslogtreecommitdiff
path: root/payloads/libpayload/arch/x86
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload/arch/x86')
-rw-r--r--payloads/libpayload/arch/x86/head.S2
-rw-r--r--payloads/libpayload/arch/x86/libpayload.ldscript14
2 files changed, 11 insertions, 5 deletions
diff --git a/payloads/libpayload/arch/x86/head.S b/payloads/libpayload/arch/x86/head.S
index 87d0037a08..1e0e4a0d3d 100644
--- a/payloads/libpayload/arch/x86/head.S
+++ b/payloads/libpayload/arch/x86/head.S
@@ -73,7 +73,7 @@ _init:
/* Store current stack pointer and set up new stack. */
movl %esp, %eax
- movl $_stack, %esp
+ movl $_estack, %esp
pushl %eax
/* Enable special x86 functions if present. */
diff --git a/payloads/libpayload/arch/x86/libpayload.ldscript b/payloads/libpayload/arch/x86/libpayload.ldscript
index 2d7e9129f7..0f27ed9233 100644
--- a/payloads/libpayload/arch/x86/libpayload.ldscript
+++ b/payloads/libpayload/arch/x86/libpayload.ldscript
@@ -39,29 +39,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 */
@@ -71,10 +77,10 @@ SECTIONS
. = ALIGN(16);
_eheap = .;
- _estack = .;
+ _stack = .;
. += CONFIG_LP_STACK_SIZE;
. = ALIGN(16);
- _stack = .;
+ _estack = .;
}
_end = .;