On Fri, 15 Dec 2023, Joshua Hudson wrote: > I started looking into EFI64 development for reasons, and discovered > something totally unexpected. The Debian grub64 loader and shim both > start with some ancient MS-owned code, and the code is obviously the > same stupid MS owned code that MS uses in their build tools since > forever, and we can tell this because of an ancient bad bit of code > writing in it. I researched the provenance of the 16 bit code and > found what I expected; it was blindly imported by the original > development of binutils-pe32 output target by looking at the output of > the MS linker without understanding it.
Wow. > I re-developed the stub 16 bit code, and prepared a patch to replace > the MS own code with my own. Good. > I tested this by placing it after the 64 byte header lifted from > debian grub EFI, resulting in a 117 byte binary (trailing zeros were > eaten by the build pathway), and ran it in Dosbox to verify the error > message appears as expected. > > Patch signed off by Joshua Hudson <joshud...@gmail.com> <patch elided> Could you please add the assembly source too? Even if only as comments next to the corresponding byte-wise contents of default_dos_message[] would be nice. brgds, H-P PS. binut...@sourceware.org address is the preferred address.