public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@sourceware.org>
To: bfd-cvs@sourceware.org
Subject: [binutils-gdb] arm-pe objdump -P
Date: Tue, 30 May 2023 04:24:37 +0000 (GMT)	[thread overview]
Message-ID: <20230530042437.451813856634@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=796029320e75a141570220224731c8151311f8d9

commit 796029320e75a141570220224731c8151311f8d9
Author: Alan Modra <amodra@gmail.com>
Date:   Tue May 30 12:59:55 2023 +0930

    arm-pe objdump -P
    
    arm-pe looks to be a very old PE implementation, incompatible with
    current arm-wince-pe.  arm-pe has different relocations and uses
    ARMMAGIC which has this comment: "I just made this up".  Well, OK, I
    don't know the history but it was probably before Microsoft "just made
    up" their constants for ARM windows CE.
    
    This patch supports objdump -P for arm-pe, and another magic constant
    that may appear in object files.  (I don't think binutils generates
    files using ARMV7PEMAGIC aka IMAGE_FILE_MACHINE_ARMNT.)
    
            * od-pe.c (is_pe_object_magic): Handle IMAGE_FILE_MACHINE_ARMNT
            and ARMMAGIC.

Diff:
---
 binutils/od-pe.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/binutils/od-pe.c b/binutils/od-pe.c
index 5f03bd8c3da..5a57a6e7486 100644
--- a/binutils/od-pe.c
+++ b/binutils/od-pe.c
@@ -450,6 +450,7 @@ is_pe_object_magic (unsigned short magic)
     case IMAGE_FILE_MACHINE_ALPHA:
     case IMAGE_FILE_MACHINE_ARM:
     case IMAGE_FILE_MACHINE_ARM64:
+    case IMAGE_FILE_MACHINE_ARMNT:
     case IMAGE_FILE_MACHINE_I386:
     case IMAGE_FILE_MACHINE_IA64:
     case IMAGE_FILE_MACHINE_POWERPC:
@@ -457,6 +458,7 @@ is_pe_object_magic (unsigned short magic)
     case IMAGE_FILE_MACHINE_AMD64:
       // FIXME: Add more machine numbers.
       return true;
+    case 0x0a00: /* ARMMAGIC */
     case 0x0500: /* SH_ARCH_MAGIC_BIG */
     case 0x0550: /* SH_ARCH_MAGIC_LITTLE */
     case 0x0b00: /* MCore */

                 reply	other threads:[~2023-05-30  4:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20230530042437.451813856634@sourceware.org \
    --to=amodra@sourceware.org \
    --cc=bfd-cvs@sourceware.org \
    /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).