[librm] Generate page tables for 64-bit builds

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2016-02-19 03:18:11 +00:00
parent d1562c38a6
commit 163f8acba0
3 changed files with 197 additions and 2 deletions

View File

@@ -26,6 +26,12 @@ SECTIONS {
PROVIDE ( _max_align = 16 );
/*
* Default to not generating space for page tables
*
*/
PROVIDE ( _use_page_tables = 0 );
/*
* Allow decompressor to require a minimum amount of temporary stack
* space.
@@ -127,6 +133,12 @@ SECTIONS {
*(COMMON)
*(.stack)
*(.stack.*)
*(.pages)
*(.pages.*)
_textdata_paged_len = ABSOLUTE ( . - _textdata );
_textdata_ptes = ABSOLUTE ( ( _textdata_paged_len + 4095 ) / 4096 );
_textdata_pdes = ABSOLUTE ( ( _textdata_ptes + 511 ) / 512 );
. += ( _use_page_tables ? ( _textdata_pdes * 4096 ) : 0 );
_etextdata = .;
}
_textdata_filesz = ABSOLUTE ( _mtextdata ) - ABSOLUTE ( _textdata );