From 12e4043bd61a67d9cab423aa48dc45adce1769cc Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Tue, 3 Jan 2023 16:02:41 +0100 Subject: [PATCH] OvmfPkg/QemuVideoDxe/VbeShim.sh: remove end-of-options delimiter for nasm 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): . 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 Cc: Gerd Hoffmann Cc: Jiewen Yao Cc: Jordan Justen Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3876 Signed-off-by: Laszlo Ersek Reviewed-by: Ard Biesheuvel --- OvmfPkg/QemuVideoDxe/VbeShim.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/OvmfPkg/QemuVideoDxe/VbeShim.sh b/OvmfPkg/QemuVideoDxe/VbeShim.sh index aea28be35f..7a0095a813 100755 --- a/OvmfPkg/QemuVideoDxe/VbeShim.sh +++ b/OvmfPkg/QemuVideoDxe/VbeShim.sh @@ -27,12 +27,15 @@ trap exit_handler EXIT # # Assemble the source file. +# (nasm doesn't recognize the "--" end-of-options delimiter; +# .) # -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; +# .) # ndisasm "$STEM".bin >"$STEM".disasm -- 2.39.2