aboutsummaryrefslogtreecommitdiffstats
path: root/src/arch/i386/scripts
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2010-04-20 11:05:53 +0100
committerMichael Brown <mcb30@ipxe.org>2010-04-20 12:56:28 +0100
commit9068249e24acc7342cd913b70745f5449b86b664 (patch)
tree58fd0e96e1b2300972ab018c79cb89a6132a5f97 /src/arch/i386/scripts
parent6c35a525da16c6147600cd8613a9b60bb793b934 (diff)
downloadipxe-9068249e24acc7342cd913b70745f5449b86b664.tar.gz
[prefix] Add .text16.early section
Add a section .text16.early which is always kept inline with the prefix. This will allow for some code sharing between the .prefix and .text16 sections. Note that the simple solution of just prepending the .prefix section to the .text16 section will not work, because a bug in Wyse Streaming Manager server (WLDRM13.BIN) requires us to place a dummy PXENV+ entry point at the start of .text16. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/arch/i386/scripts')
-rw-r--r--src/arch/i386/scripts/i386.lds22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/arch/i386/scripts/i386.lds b/src/arch/i386/scripts/i386.lds
index 77e8c7e7..7c55c2f6 100644
--- a/src/arch/i386/scripts/i386.lds
+++ b/src/arch/i386/scripts/i386.lds
@@ -45,17 +45,25 @@ SECTIONS {
*
*/
- .text16 0x0 : AT ( _text16_lma ) {
+ .text16.early 0x0 : AT ( _text16_early_lma ) {
_text16 = .;
*(.text16.null)
. += 1; /* Prevent NULL being valid */
+ *(.text16.early)
+ *(.text16.early.*)
+ _etext16_early = .;
+ } .text16.late ALIGN ( _max_align ) : AT ( _text16_late_lma ) {
+ _text16_late = .;
*(.text16)
*(.text16.*)
_mtext16 = .;
} .bss.text16 (NOLOAD) : AT ( _end_lma ) {
_etext16 = .;
}
- _text16_filesz = ABSOLUTE ( _mtext16 - _text16 );
+ _text16_early_filesz = ABSOLUTE ( _etext16_early - _text16 );
+ _text16_early_memsz = ABSOLUTE ( _etext16_early - _text16 );
+ _text16_late_filesz = ABSOLUTE ( _mtext16 - _text16_late );
+ _text16_late_memsz = ABSOLUTE ( _etext16 - _text16_late );
_text16_memsz = ABSOLUTE ( _etext16 - _text16 );
/*
@@ -169,9 +177,13 @@ SECTIONS {
. += _prefix_filesz;
. = ALIGN ( _max_align );
+ _text16_early_lma = .;
+ . += _text16_early_filesz;
+
+ . = ALIGN ( _max_align );
_payload_lma = .;
- _text16_lma = .;
- . += _text16_filesz;
+ _text16_late_lma = .;
+ . += _text16_late_filesz;
. = ALIGN ( _max_align );
_data16_lma = .;
@@ -194,8 +206,6 @@ SECTIONS {
* Values calculated to save code from doing it
*
*/
- _prefix_memsz_pgh = ( ( _prefix_memsz + 15 ) / 16 );
- _prefix_memsz_sect = ( ( _prefix_memsz + 511 ) / 512 );
_text16_memsz_pgh = ( ( _text16_memsz + 15 ) / 16 );
_data16_memsz_pgh = ( ( _data16_memsz + 15 ) / 16 );
}