Fix writing COFF files when cross-compiling on OSX

Rafael Espíndola rafael.espindola at gmail.com
Fri Sep 5 12:13:29 PDT 2014


A test somewhere in llvm/test. Given what this patch does, you should
be able to test it with llvm-mc I think.

On 5 September 2014 02:57, Berkus <berkus at atta-metta.net> wrote:
> Do you want it to be a stand-alone test case for testing suite or just an
> example that illustrates the problem?
>
>
> On 04 Sep 2014, at 21:47, Rafael Espíndola <rafael.espindola at gmail.com>
> wrote:
>
> Can you add a testcase to the patch?
>
> On 28 May 2014 11:34, Stanislav Karchebny <berkus at madfire.net> wrote:
>
> The issue: Trying to build an EFI application with clang on OSX host.
>
> Specifying -target i386-pe—coff resulted in abort from MCWinCOFFStreamer:
>
> fatal error in backend: alignment is limited to 32-bytes
>
> Turns out, that while the streamer was created for coff, the asm backend and
> asminfo were created for ELF output.
> The attached patch fixes it by creating appropriate objects when COFF output
> is requested.
>
> After applying the patch I was able to successfully build and run my EFI
> application using only clang/lld (no GNU or MSVC tools involved).
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>




More information about the llvm-commits mailing list