From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk1-xa29.google.com (mail-vk1-xa29.google.com [IPv6:2607:f8b0:4864:20::a29]) by sourceware.org (Postfix) with ESMTPS id 95BFB3858C35 for ; Sun, 17 Dec 2023 21:20:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 95BFB3858C35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 95BFB3858C35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::a29 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702848042; cv=none; b=X3A3e1gXZfegt63COe4a+gJ2R3aNX/bKA6iV93u307oxSH0NGcbQHBQiIn2Tqxld+/4a93+QERAxHRu1wCqolF0H4UvPpLCdL37kpL9cXBhE+mrDFu/PDllMjQs6cpIGs6dDKTZabJLdtQn/tRvWJc4cGkRXXIeTmUI00Kk99Io= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702848042; c=relaxed/simple; bh=AbgPLklNxrklhMhWZtkgwoxRAaGrXtI3lh8QQimbGDw=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=UnBLC+WJ7Z4rnM2tTNMDJsYfxvPmDyb0hZMoiN99CzQZJlBh/tpYq3IBSRB1gBEq7uSInQfWpsT9sa/asWYi4+sok7rVZY9pMUK2PiAy9MUXSGcb9tIBdiPPgbA9GOi4QXLg9evimR2EDRrtancTLpLTE7aHTqIjOZOkzVz4zIM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-vk1-xa29.google.com with SMTP id 71dfb90a1353d-4b6be94d512so596348e0c.1 for ; Sun, 17 Dec 2023 13:20:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702848040; x=1703452840; darn=sourceware.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=2YF3b0bw7mwG27YrrInCCFgKkYSZ+fo8B0xxyNcuvN0=; b=EZwtGYI4gPk8Mnl0wDwigz4/KNuTjziLcFvIv2s4vObJGSwRK0Sb3P1hXrTBnVVhWE 3mj5zo9Ey5IzR+37OT4J9SE93NAiIZ3BZDXXSwhD2XQztKSnldu2iRrmAIbzUWdpLxwu NyEnrmqYYJ4jmkmKGRVWOcnTKkjDvzH7zn7DO9y/eV2h/QphgSa3jmgtPZYKymaQ0HHo 02wU9/4LOjFmAYS1PyMONEn3GD8snbuDgOl2SzdbZGAoFmHPX0dfTqWLr7aj/lgWdHiZ CLSIY7BgH/7FrYpewHaONXUdbsHtDJ2zzeDaCo0fISj7enWWQV0Qb/iEOcfNXledylOM OrFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702848040; x=1703452840; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2YF3b0bw7mwG27YrrInCCFgKkYSZ+fo8B0xxyNcuvN0=; b=kzKgnK/MgvFHPXVeafQe+hlxbtTLX9ONQJqsostyq3EkZvAZWGu1/H8FSLlAZ+M8CM 9Zx3G7wxvwIMV3PbiQE/YG4hbSXBwbxJOSE49Bx8WwIcqgCg9iywRfydIpDq9kFofnTZ Von7m4v+95aHJCmfC8Ti4trSqFLFEjDOAew3hpiRVsTfAt7OyXk7pyz4DW+8r09h1Uao vv0wve3/WXmGYacrMeOvfH5TBtA44BI99Ph5idadh0V8uvcraF87efPrVdjv5vbvdF7d DD8sB15/JVzs9l8QiUxPUYs1azM7wI1Qm4AAZoAxMrRsiTPc3SwIzDrP7I0ltt5k/HcU 98eA== X-Gm-Message-State: AOJu0YycoK2hpOtIFrOwuyNJSbEEMG1IwPDAuMfLkxgTh7UvXFie7DqB 9YbrT6Xos7RafihOye/NQvCoBCDknmMa1xxuWLh/K/rT7SYYMg== X-Google-Smtp-Source: AGHT+IEakL5iTHutI+D5Iz00YPPcqxDmG43MXegvh1aNasQVqR3lMvl1lYWypWiVnJcPQtdqMS4HjrYlhluGJBgxYxw= X-Received: by 2002:a05:6102:4188:b0:464:5eac:c249 with SMTP id cd8-20020a056102418800b004645eacc249mr13590292vsb.0.1702848039872; Sun, 17 Dec 2023 13:20:39 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Joshua Hudson Date: Sun, 17 Dec 2023 13:20:28 -0800 Message-ID: Subject: Re: PE header copyright issue To: Hans-Peter Nilsson Cc: bug-binutils@gnu.org, binutils@sourceware.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,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: Hans-Peter Nilsson wrote: > 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. Done. I thought about it, and a block comment right next to the hex blob is indeed the right way. You're not setting up a build environment for it unless you want to take additional build dependencies. I'm going to be out for two weeks and not able to make any further code changes. joshua@nova:/tmp$ gpg --clearsign --not-dash-escaped < binutilspe16.patch -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 NotDashEscaped: You need gpg to verify this message diff --git a/bfd/peicode.h b/bfd/peicode.h index e16bfc25437..3d253a45f4f 100644 --- a/bfd/peicode.h +++ b/bfd/peicode.h @@ -258,16 +258,19 @@ coff_swap_scnhdr_in (bfd * abfd, void * ext, void * in) static bool pe_mkobject (bfd * abfd) { - /* Some x86 code followed by an ascii string. */ + /* DOS error message emitter followed by message */ static const char default_dos_message[64] = { - 0x0e, 0x1f, 0xba, 0x0e, 0x00, 0xb4, 0x09, 0xcd, - 0x21, 0xb8, 0x01, 0x4c, 0xcd, 0x21, 0x54, 0x68, - 0x69, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, - 0x61, 0x6d, 0x20, 0x63, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x20, 0x62, 0x65, 0x20, 0x72, 0x75, 0x6e, - 0x20, 0x69, 0x6e, 0x20, 0x44, 0x4f, 0x53, 0x20, - 0x6d, 0x6f, 0x64, 0x65, 0x2e, 0x0d, 0x0d, 0x0a, - 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; /* mov dx, message mov ah, 9 ; Out string int 21h mov ax, 4c01h ; exit process, code 1 int 21h message: */ + 0xba, 0x0c, 0x01, 0xb4, 0x09, 0xcd, 0x21, 0xb8, + 0x01, 0x4c, 0xcd, 0x21, "This", + " program cannot ", + "be run in DOS mo", + "de.\x0d\x0a$" }; pe_data_type *pe = bfd_zalloc (abfd, sizeof (*pe)); abfd->tdata.pe_obj_data = pe; -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEzQMuEig2Xhk0+cu7b7uWgHSsbDwFAmV/Y/8ACgkQb7uWgHSs bDyq/wf/UpGm5rEuLhiITeILpRigytZCHyYP5njqgB9Q9x9JTyFGOOOfYJFcVjEc OKzGZjlvsxVyuzQO6+b14PtXvDfCofJFjUnVm6ucCH8mhVMTuyZttZ+fFRRTx3GS 9cRzX2LyZQU/c9RWDpc7Diy+MlQvGGLIC8DtV+oR/nCtaN3zvMptWalCXHipSfVG J6QFURQ2uJ3MtbgrQZ2t41nKkoCH04GDd01vn725KYqKIMGoYr91fEdmrHNy/rpb oo6dX7HqXTUr5/lowkuHHFnKJW0m8wjfdxYy5rQTebnG7gWU7OtCI/+bVEKwLa9F VLyzCdoB0NDAZzHH+n5b0NqPwspyxA== =AFq0 -----END PGP SIGNATURE-----