From e085cbbab72df91571b715d49b68c8a7d32420a9 Mon Sep 17 00:00:00 2001 From: Elaina Claus Date: Tue, 15 Oct 2024 18:33:57 -0400 Subject: [PATCH] remove jmp short init at the start of stage2 also correct total size output as combined .data + .text --- src/stage2/stage2.nasm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/stage2/stage2.nasm b/src/stage2/stage2.nasm index a2f60cd..e87a9cb 100755 --- a/src/stage2/stage2.nasm +++ b/src/stage2/stage2.nasm @@ -48,9 +48,6 @@ section .text begin_text: -jmp short (init - $$) -nop - ; dl = byte boot_drive ; si = word part_offset (active partition offset) ; bx = ptr PartTable_t partition_table @@ -489,7 +486,7 @@ BUILD_GIT_HASH: db __GIT_HASH__, 00h end_data: -%assign bytes_remaining ((MAX_STAGE2_BYTES - 4) - ($ - $$)) +%assign bytes_remaining ((MAX_STAGE2_BYTES - 4) - (($ - $$) + (end_text - begin_text))) %warning STAGE2 has bytes_remaining bytes remaining for code/data (MAX: MAX_STAGE2_BYTES) ; section start location needs to be a 'critical expression'