[LLVMdev] Generate PE\COFF file with ARM instructions

Tim Northover
2013-05-13T16:13:09Z

> 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.

The relocations are probably almost all different too. I couldn't find
any specification (they're probably undocumented) you can get an idea
of the work required from the ELF equivalent:
http://infocenter.arm.com/help/topic/com.arm.doc.ihi0044e/IHI0044E_aaelf.pdf

LLVM itself doesn't have to support all of the relocations defined
(just a sufficiently powerful subset to describe any program) but
binutils (specifically ld and to a lesser extent gas) theoretically
needs to handle each and every one.

You might be able to get away with less, but it's dodgy from a
neatness point of view: a compiler could claim
implementation-decision; a linker would be clearly ABI non-compliant.

Nothing impossible, of course, but more than a quick evening's job
even for someone who knew the code inside-out.

Cheers.

Tim.