[LLVMdev] Win32 COFF Support

Aaron Gray aaronngray.lists at googlemail.com
Sun May 2 13:47:48 PDT 2010


On 2 May 2010 19:32, Nathan Jeffords <blunted2night at gmail.com> wrote:

> Thanks for both of your feedback, I will attempt to make it fit LLVM coding
> standards better before I resubmit my work.


You can send me early drafts to run past GCC, send me something that works.

As far as the hooks I put in, they are really only there so I could build
> the object exporter outside of LLVM, I think having it built directly in
> like others is preferable in the end. I do think it would be useful if
> projects had the option of extending supported formats without having to
> modify LLVM itself, but my changes main goal was minimal impact on LLVM
> sources.
>

AFAICT The hooks you sent did not call your code at all.

Have a look at the MachOWriter, this is designed to be extendable to other
writers. The MCStreamer stuff just needs the same doing probably in
TargetAsmBackend. It would be good to have this as a separate patch. This
will allow both COFFWriter and ELFWriter as well as the MachOWriter to
coexist and be selected by TargetTriple. BTW could you have your Writer and
Streamer in different source code files, and follow the MachO code format as
far as is possible/reasonable.

JTFYI The COFF code I have written consists of Reader and Writer of COFF
internal object modules to/from COFF format. I am looking at producing a
linker with the addition of a PE Writer class, and Library Reader class.
This should then make LLVM and CLANG more independant on the Windows
Platform. I have a COFF Dumper class too which works with the reader and the
internal Object Module format.

Regards,

Aaron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100502/79f70e64/attachment.html>


More information about the llvm-dev mailing list