arm-pe objdump -P

Pedro Alves pedro@palves.net
Tue May 30 12:53:02 GMT 2023


On 2023-05-30 5:23 a.m., Alan Modra via Binutils wrote:
> 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.


IIRC, there used to be an arm-epoc-pe target for Symbian OS (which has since
been eliminated), and arm-pe ended up this weird thing that nobody really knew
what it was for.

/me googles

I found some more info in this old discussion:

  https://binutils.sourceware.narkive.com/nzAvx0GG/patch-correct-arm-rva32-value-in-pe-images-generation-for-arm-windows-ce

Note Nick's remark back then:

 "The arm-epoc-pe target was for the SymbianOS. The epoc qualifier was added
 to distinguish it from the WinCE targeted PE format version. Ideally arm-pe
 should have been dropped, but it never was."

(I haven't done anything with ARM Windows CE in over a decade, and
note GCC has dropped support for it some time ago.  GDBserver support has been
dropped too, only cross debugging support remains in GDB proper, at least, until
someone stumbles on it.)


More information about the Binutils mailing list