summaryrefslogtreecommitdiffstats
path: root/src/arch/i386/scripts
diff options
context:
space:
mode:
authorMichael Brown2015-02-24 17:13:55 +0100
committerMichael Brown2015-02-24 17:33:14 +0100
commit3e04f0791e614772f3ffe3663e4c8da71e2bc981 (patch)
tree541275eaab72461b99f646c2e1876595199dad3e /src/arch/i386/scripts
parent[hyperv] Check for required features (diff)
downloadipxe-3e04f0791e614772f3ffe3663e4c8da71e2bc981.tar.gz
ipxe-3e04f0791e614772f3ffe3663e4c8da71e2bc981.tar.xz
ipxe-3e04f0791e614772f3ffe3663e4c8da71e2bc981.zip
[prefix] Use .bss16 as temporary stack space for calls to install_block
Some decompression algorithms (e.g. LZMA) require large amounts of temporary stack space, which may not be made available by all prefixes. Use .bss16 as a temporary stack for the duration of the calls to install_block (switching back to the external stack before we start making calls into code which might access variables in .bss16), and allow the decompressor to define a global symbol to force a minimum value on the size of .bss16. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/arch/i386/scripts')
-rw-r--r--src/arch/i386/scripts/i386.lds8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/arch/i386/scripts/i386.lds b/src/arch/i386/scripts/i386.lds
index 98f95cb23..348dfefae 100644
--- a/src/arch/i386/scripts/i386.lds
+++ b/src/arch/i386/scripts/i386.lds
@@ -27,6 +27,13 @@ SECTIONS {
PROVIDE ( _max_align = 16 );
/*
+ * Allow decompressor to require a minimum amount of temporary stack
+ * space.
+ *
+ */
+ PROVIDE ( _min_decompress_stack = 0 );
+
+ /*
* The prefix
*
*/
@@ -87,6 +94,7 @@ SECTIONS {
*(.bss16.*)
*(.stack16)
*(.stack16.*)
+ . = MAX ( ., _mdata16 + _min_decompress_stack );
_edata16 = .;
}
_data16_filesz = ABSOLUTE ( _mdata16 ) - ABSOLUTE ( _data16 );