]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/QemuVideoDxe/VbeShim.sh: remove end-of-options delimiter for nasm
authorLaszlo Ersek <lersek@redhat.com>
Tue, 3 Jan 2023 15:02:41 +0000 (16:02 +0100)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 4 Jan 2023 09:45:06 +0000 (09:45 +0000)
Per my bisection: nasm broke the parsing of the "--" end-of-options
delimiter in commit 55568c1193df ("nasm: scan the command line twice",
2016-10-03), part of the nasm-2.13 release. The parsing remains broken in
at least nasm-2.15.03. The (invalid) error message is: "more than one
input file specified". I've filed the following ticket for upstream nasm
(and ndisasm): <https://bugzilla.nasm.us/show_bug.cgi?id=3392829>.

Since the delimiter is not necessary in practice (due to $STEM being
"VbeShim", i.e., not starting with a hyphen), simply remove the delimiter.

Tested by enabling DEBUG in "VbeShim.asm", running the script, building
OVMF, booting Windows 7, and checking the firmware log (debug console).

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3876
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
OvmfPkg/QemuVideoDxe/VbeShim.sh

index aea28be35f5cbe149c4c1c10657b2e359b405709..7a0095a813cf58d5f5d4e2ad5c8a83629bcf81f8 100755 (executable)
@@ -27,12 +27,15 @@ trap exit_handler EXIT
 
 #
 # Assemble the source file.
+# (nasm doesn't recognize the "--" end-of-options delimiter;
+# <https://bugzilla.nasm.us/show_bug.cgi?id=3392829>.)
 #
-nasm -o "$STEM".bin -- "$STEM".asm
+nasm -o "$STEM".bin "$STEM".asm
 
 #
 # Disassemble it, in order to get a binary dump associated with the source.
-# (ndisasm doesn't recognize the "--" end-of-options delimiter.)
+# (ndisasm doesn't recognize the "--" end-of-options delimiter;
+# <https://bugzilla.nasm.us/show_bug.cgi?id=3392829>.)
 #
 ndisasm "$STEM".bin >"$STEM".disasm