david/ipxe
Archived
1
0
This repository has been archived on 2020-12-06. You can view files and clone it, but cannot push or open issues or pull requests.
ipxe/src/arch/i386/prefix
Joshua Oreman d5d68b2e31 [zbin] Change fixup semantics to support ROMs over 128k uncompressed
The option ROM header contains a one-byte field indicating the number
of 512-byte sectors in the ROM image.  Currently it is linked to
contain the number of uncompressed sectors, with an instruction to the
compressor to correct it.  This causes link failure when the
uncompressed size of the ROM image is over 128k.

Fix by replacing the SUBx compressor fixup with an ADDx fixup that
adds the total compressed output length, scaled as requested, to an
addend stored in the field where the final length value will be
placed.  This is similar to the behavior of ELF relocations, and
ensures that an overflow error will not be generated unless the
compressed size is still too large for the field.

This also allows us to do away with the _filesz_pgh and _filesz_sect
calculations exported by the linker script.

Output tested bitwise identical to the old SUBx mechanism on hd, dsk,
lkrn, and rom prefixes, on both 32-bit and 64-bit processors.

Modified-by: Michael Brown <mcb30@etherboot.org>
Signed-off-by: Michael Brown <mcb30@etherboot.org>
2009-08-11 12:59:26 +01:00
..
bImageprefix.S Rename .lilo extension to .lkrn and updated dependencies 2007-07-06 08:04:06 -04:00
bootpart.S [legal] Add a selection of FILE_LICENCE declarations 2009-05-18 08:33:25 +01:00
comprefix.S Prevent hundreds of errors from "make symcheck". The prefix exit path 2005-04-23 14:57:53 +00:00
dskprefix.S [zbin] Change fixup semantics to support ROMs over 128k uncompressed 2009-08-11 12:59:26 +01:00
elf_dprefix.S Prevent hundreds of errors from "make symcheck". The prefix exit path 2005-04-23 14:57:53 +00:00
elfprefix.S Prevent hundreds of errors from "make symcheck". The prefix exit path 2005-04-23 14:57:53 +00:00
exeprefix.S [misc] Fix source files erroneously marked as executable 2009-06-02 11:26:09 +01:00
hdprefix.S [zbin] Change fixup semantics to support ROMs over 128k uncompressed 2009-08-11 12:59:26 +01:00
kkpxeprefix.S [legal] Add a selection of FILE_LICENCE declarations 2009-05-18 08:33:25 +01:00
kpxeprefix.S [legal] Add a selection of FILE_LICENCE declarations 2009-05-18 08:33:25 +01:00
libprefix.S [legal] Add a selection of FILE_LICENCE declarations 2009-05-18 08:33:25 +01:00
lkrnprefix.S [zbin] Change fixup semantics to support ROMs over 128k uncompressed 2009-08-11 12:59:26 +01:00
lmelf_dprefix.S Prevent hundreds of errors from "make symcheck". The prefix exit path 2005-04-23 14:57:53 +00:00
lmelf_prefix.S Prevent hundreds of errors from "make symcheck". The prefix exit path 2005-04-23 14:57:53 +00:00
mbr.S Added active partition locator, and simple MBR built using it. 2007-07-05 00:21:01 +01:00
nbiprefix.S [zbin] Change fixup semantics to support ROMs over 128k uncompressed 2009-08-11 12:59:26 +01:00
nullprefix.S Prevent hundreds of errors from "make symcheck". The prefix exit path 2005-04-23 14:57:53 +00:00
pxeprefix.S [legal] Add a selection of FILE_LICENCE declarations 2009-05-18 08:33:25 +01:00
romprefix.S [zbin] Change fixup semantics to support ROMs over 128k uncompressed 2009-08-11 12:59:26 +01:00
unnrv2b16.S [legal] Add a selection of FILE_LICENCE declarations 2009-05-18 08:33:25 +01:00
unnrv2b.S [legal] Add a selection of FILE_LICENCE declarations 2009-05-18 08:33:25 +01:00
usbdisk.S Use partition type 0xeb ("EtherBoot"), to avoid any attempts to mount 2007-07-05 14:20:55 +01:00