From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from arjuna.pair.com (arjuna.pair.com [209.68.5.131]) by sourceware.org (Postfix) with ESMTPS id D5E553858D39 for ; Sun, 17 Dec 2023 18:14:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D5E553858D39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=bitrange.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bitrange.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D5E553858D39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.68.5.131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702836884; cv=none; b=WGScMDdyMNR2o348TT4s+IHPQiksn4MrFnJaOPDTXOb1gG85nh5XEYAeE9XbxPgwnAlSSwlOO0fQoEJDBysMIh7/Z+ylNle7cFw0XMwC3oHwsWw7Elc55iGOTg0Ix9xHoIetDPWphzBt6K+IVq+9WmOt6onBW8IX4nC/r+9Tf9U= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702836884; c=relaxed/simple; bh=2H0kXxrjv+mnqHXQLF+WbkIlFpf+ZOzgk2rzpGkdj7Y=; h=Date:From:To:Subject:Message-ID:MIME-Version; b=ZmXXMRds8t3xaql+wfhLii/3UnHBKLmcxH1TlsaHYsZnSdOxUYS6s4niisYHkKkQ4tRfMsH+VGTV42BI1oJVJ4lvV5S+96fGShNcCmfxCYsrnjt4dTJdAUorIdgZkwbciGz/+PxS39nJNk6H9tarzzjSrMoUn3zx+8yyf6TlEog= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by arjuna.pair.com (Postfix, from userid 3006) id 660B18A7C2; Sun, 17 Dec 2023 13:14:42 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by arjuna.pair.com (Postfix) with ESMTP id 6587E8A778; Sun, 17 Dec 2023 13:14:42 -0500 (EST) Date: Sun, 17 Dec 2023 13:14:42 -0500 (EST) From: Hans-Peter Nilsson X-X-Sender: hp@arjuna.pair.com To: Joshua Hudson cc: bug-binutils@gnu.org, binutils@sourceware.org Subject: Re: PE header copyright issue In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20.16 (BSF 172 2016-09-29) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Scanned-By: mailmunge 3.11 on 209.68.5.131 X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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 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. binutils@sourceware.org address is the preferred address.