mirror of
https://github.com/ipxe/ipxe
synced 2025-12-25 00:17:57 +03:00
[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>
This commit is contained in:
@@ -26,6 +26,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 );
|
||||
|
||||
Reference in New Issue
Block a user