[lkrnprefix] Support a longer version string

The bzImage specification allows two bytes for the setup code jump
instruction at offset 0x200, which limits its relative offset to +0x7f
bytes.  This currently imposes an upper limit on the length of the
version string, which currently precedes the setup code.

Fix by moving the version string to the .prefix.data section, so that
it no longer affects the placement of the setup code.

Originally-fixed-by: Miao Wang <shankerwangmiao@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
pull/1417/head
Michael Brown 2025-02-28 11:27:21 +00:00
parent 12ea8c4074
commit be3a78eaf8
1 changed files with 2 additions and 0 deletions

View File

@ -104,6 +104,7 @@ hardware_subarch:
hardware_subarch_data:
.byte 0, 0, 0, 0, 0, 0, 0, 0
.section ".prefix.data", "aw", @progbits
version_string:
.asciz VERSION
@ -113,6 +114,7 @@ version_string:
*
*/
.section ".prefix", "ax", @progbits
setup:
/* Fix up code segment */
pushw %ds