[PATCH] Recognize the armv7 pe magic

Martin Storsjö martin@martin.st
Thu Nov 15 14:04:00 GMT 2012


On Thu, 15 Nov 2012, Martin Storsjo wrote:

> ---
> include/coff/arm.h |    3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>

> diff --git a/include/coff/arm.h b/include/coff/arm.h
> index 9c34005..9dabce0 100644
> --- a/include/coff/arm.h
> +++ b/include/coff/arm.h
> @@ -81,9 +81,10 @@
>
>  #define	ARMPEMAGIC	0x1c0
>  #define	THUMBPEMAGIC	0x1c2
> +#define	ARMV7MAGIC	0x1c4
>
>  #undef  ARMBADMAG
> -#define ARMBADMAG(x) (((x).f_magic != ARMMAGIC) && ((x).f_magic != ARMPEMAGIC) && ((x).f_magic != THUMBPEMAGIC))
> +#define ARMBADMAG(x) (((x).f_magic != ARMMAGIC) && ((x).f_magic != ARMPEMAGIC) && ((x).f_magic != THUMBPEMAGIC) && ((x).f_magic != ARMV7MAGIC))
>
>  #define OMAGIC          0404    /* object files, eg as output */
>  #define ZMAGIC          0413    /* demand load format, eg normal ld output */

Or perhaps it would be better to name this constant ARMV7PEMAGIC (the 
version above is missing PE in the name).

// Martin



More information about the Binutils mailing list