summaryrefslogtreecommitdiffstats
path: root/src/arch/i386
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/i386')
-rw-r--r--src/arch/i386/prefix/dskprefix.S4
-rw-r--r--src/arch/i386/prefix/hdprefix.S4
-rw-r--r--src/arch/i386/prefix/lkrnprefix.S4
-rw-r--r--src/arch/i386/prefix/nbiprefix.S8
-rw-r--r--src/arch/i386/prefix/romprefix.S12
-rw-r--r--src/arch/i386/scripts/i386.lds9
6 files changed, 16 insertions, 25 deletions
diff --git a/src/arch/i386/prefix/dskprefix.S b/src/arch/i386/prefix/dskprefix.S
index 2716a16b..60d351f7 100644
--- a/src/arch/i386/prefix/dskprefix.S
+++ b/src/arch/i386/prefix/dskprefix.S
@@ -146,9 +146,9 @@ got_sectors:
/* Jump to loaded copy */
ljmp $SYSSEG, $start_runtime
-endseg: .word SYSSEG + _filesz_pgh
+endseg: .word SYSSEG
.section ".zinfo.fixup", "a", @progbits /* Compressor fixups */
- .ascii "SUBW"
+ .ascii "ADDW"
.long endseg
.long 16
.long 0
diff --git a/src/arch/i386/prefix/hdprefix.S b/src/arch/i386/prefix/hdprefix.S
index a06f10c3..05767567 100644
--- a/src/arch/i386/prefix/hdprefix.S
+++ b/src/arch/i386/prefix/hdprefix.S
@@ -65,10 +65,10 @@ max_sector:
max_head:
.byte 0
load_length:
- .long _filesz_sect
+ .long 0
.section ".zinfo.fixup", "a", @progbits /* Compressor fixups */
- .ascii "SUBL"
+ .ascii "ADDL"
.long load_length
.long 512
.long 0
diff --git a/src/arch/i386/prefix/lkrnprefix.S b/src/arch/i386/prefix/lkrnprefix.S
index 02249f7a..101d0388 100644
--- a/src/arch/i386/prefix/lkrnprefix.S
+++ b/src/arch/i386/prefix/lkrnprefix.S
@@ -94,10 +94,10 @@ setup_sects:
root_flags:
.word 0
syssize:
- .long _filesz_pgh - PREFIXPGH
+ .long -PREFIXPGH
.section ".zinfo.fixup", "a", @progbits /* Compressor fixups */
- .ascii "SUBL"
+ .ascii "ADDL"
.long syssize
.long 16
.long 0
diff --git a/src/arch/i386/prefix/nbiprefix.S b/src/arch/i386/prefix/nbiprefix.S
index 4fb4acb1..607d80fb 100644
--- a/src/arch/i386/prefix/nbiprefix.S
+++ b/src/arch/i386/prefix/nbiprefix.S
@@ -30,16 +30,16 @@ segment_header:
.byte 0
.byte 0x04 /* Last segment */
.long 0x00007e00
-imglen: .long _filesz - 512
-memlen: .long _filesz - 512
+imglen: .long -512
+memlen: .long -512
.size segment_header, . - segment_header
.section ".zinfo.fixup", "a", @progbits /* Compressor fixups */
- .ascii "SUBL"
+ .ascii "ADDL"
.long imglen
.long 1
.long 0
- .ascii "SUBL"
+ .ascii "ADDL"
.long memlen
.long 1
.long 0
diff --git a/src/arch/i386/prefix/romprefix.S b/src/arch/i386/prefix/romprefix.S
index 4b9d5447..cb474e81 100644
--- a/src/arch/i386/prefix/romprefix.S
+++ b/src/arch/i386/prefix/romprefix.S
@@ -33,7 +33,7 @@ FILE_LICENCE ( GPL2_OR_LATER )
.org 0x00
romheader:
.word 0xAA55 /* BIOS extension signature */
-romheader_size: .byte _filesz_sect /* Size in 512-byte blocks */
+romheader_size: .byte 0 /* Size in 512-byte blocks */
jmp init /* Initialisation vector */
checksum:
.byte 0
@@ -46,7 +46,7 @@ checksum:
.size romheader, . - romheader
.section ".zinfo.fixup", "a", @progbits /* Compressor fixups */
- .ascii "SUBB"
+ .ascii "ADDB"
.long romheader_size
.long 512
.long 0
@@ -61,23 +61,23 @@ pciheader:
.byte 0x03 /* PCI data structure revision */
.byte 0x02, 0x00, 0x00 /* Class code */
pciheader_image_length:
- .word _filesz_sect /* Image length */
+ .word 0 /* Image length */
.word 0x0001 /* Revision level */
.byte 0x00 /* Code type */
.byte 0x80 /* Last image indicator */
pciheader_runtime_length:
- .word _filesz_sect /* Maximum run-time image length */
+ .word 0 /* Maximum run-time image length */
.word 0x0000 /* Configuration utility code header */
.word 0x0000 /* DMTF CLP entry point */
.equ pciheader_len, . - pciheader
.size pciheader, . - pciheader
.section ".zinfo.fixup", "a", @progbits /* Compressor fixups */
- .ascii "SUBW"
+ .ascii "ADDW"
.long pciheader_image_length
.long 512
.long 0
- .ascii "SUBW"
+ .ascii "ADDW"
.long pciheader_runtime_length
.long 512
.long 0
diff --git a/src/arch/i386/scripts/i386.lds b/src/arch/i386/scripts/i386.lds
index 8a0c6733..52f8eb4b 100644
--- a/src/arch/i386/scripts/i386.lds
+++ b/src/arch/i386/scripts/i386.lds
@@ -197,13 +197,4 @@ SECTIONS {
_prefix_memsz_sect = ( ( _prefix_memsz + 511 ) / 512 );
_text16_memsz_pgh = ( ( _text16_memsz + 15 ) / 16 );
_data16_memsz_pgh = ( ( _data16_memsz + 15 ) / 16 );
-
- /*
- * File size in paragraphs and sectors. Note that wherever the
- * _filesz variables are used, there must be a corresponding
- * .zinfo.fixup section.
- *
- */
- _filesz_pgh = ( ( _filesz + 15 ) / 16 );
- _filesz_sect = ( ( _filesz + 511 ) / 512 );
}