From: Joshua Hudson <joshudson@gmail.com>
To: Hans-Peter Nilsson <hp@bitrange.com>
Cc: bug-binutils@gnu.org, binutils@sourceware.org
Subject: Re: PE header copyright issue
Date: Sun, 17 Dec 2023 13:20:28 -0800 [thread overview]
Message-ID: <CA+jjjYSZbe6DFZcENA2N4qPyXd+mODxMw4eE-N9RQA1nzcyV9g@mail.gmail.com> (raw)
In-Reply-To: <alpine.BSF.2.20.16.2312171308020.53469@arjuna.pair.com>
Hans-Peter Nilsson <hp@bitrange.com> 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-----
prev parent reply other threads:[~2023-12-17 21:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CA+jjjYR7LDUkO8-Q08V9eC9_dQsTPgPn+dD4E7eyc1VY4B9=Qg@mail.gmail.com>
2023-12-17 18:14 ` Hans-Peter Nilsson
2023-12-17 21:20 ` Joshua Hudson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+jjjYSZbe6DFZcENA2N4qPyXd+mODxMw4eE-N9RQA1nzcyV9g@mail.gmail.com \
--to=joshudson@gmail.com \
--cc=binutils@sourceware.org \
--cc=bug-binutils@gnu.org \
--cc=hp@bitrange.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).