[LLVMdev] Generate PE\COFF file with ARM instructions

Gordon Keiser
2013-05-13T17:28:48Z

I don't remember the exact version it happened, but right after the Windows
RT / Windows Phone 8 stuff was announced and it became known that native apps
were possible, I seem to remember GCC removing support for ARM/PE.  I don't
know if this was related to binutils removing it or if it was strictly gcc
related, but you may have better luck hacking it into a pre-2012 version.

-Gordon

-----Original Message-----
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On
Behalf Of David Given
Sent: Monday, May 13, 2013 11:53 AM
To: llvmdev at cs.uiuc.edu
Subject: Re: [LLVMdev] Generate PE\COFF file with ARM instructions

Moshe, Nir wrote:
[...]
> I have a question about the LLVM ARM backend:
>
> I try to build *.c files for Windows Phone (Windows 8) - so, basically
> I need to generate an "arm-pe" file (I *think* it has the same
file
> structure like x86-pe file, but i am not sure).
> unfortunately, LLVM has no support with ARM PE\COFF.

We recently ran into this. Unfortunately there's no binutils support for ARM
PE/COFF (at least the last time I looked).

It doesn't seem to be very hard to add; from what I found out, the only real
difference is a difference to the CPU type field. But binutils is sufficiently
painful to wrangle that I couldn't do it in a few hours, so we went for
other tools.

With binutils support adding ARM PE/COFF should be fairly easy, depending on how
much the ABI has changed from ARM EABI.

--
┌─── ｄｇ＠ｃｏｗｌａｒｋ．ｃｏｍ ───── http://www.cowlark.com ───── │ │ 𝕻𝖍'𝖓𝖌𝖑𝖚𝖎
𝖒𝖌𝖑𝖜'𝖓𝖆𝖋𝖍 𝕮𝖙𝖍𝖚𝖑𝖍𝖚 𝕽'𝖑𝖞𝖊𝖍
𝖜𝖌𝖆𝖍'𝖓𝖆𝖌𝖑 𝖋𝖍𝖙𝖆𝖌𝖓.
│