[llvm-commits] [PATCH]: sketch of PPC32 ELF writer

Evan Cheng evan.cheng at apple.com
Mon Aug 1 11:22:26 PDT 2011


Looks fine to me. Thanks.

Evan
On Aug 1, 2011, at 11:19 AM, Roman Divacky wrote:

> Hi,
> 
> the attached two patches sketch out PPC32 ELF writer.
> 
> 1) powerpc-mc-md.patch
> 
>        This defines some PPC relocation types and introduces
>        PPCELFObjectWriter and ELFPPCAsmBackend. Including ApplyFixup()
>        implementation.
> 
>        I think this patch is basically committable.
> 
> 2) powerpc-mc.patch
> 
>        This implements PPCELFObjectWriter class including quite wrong
>        GetRelocType(). There's a hack in RecordRelocation where
>        fixup_ppc_ha16/fixup_ppc_lo16 offset needs to be adjusted by two.
>        I don't know how to do this properly.
> 
>        I think this needs more work on the GetRelocType() and the fixup
>        hack.
> 
> With these two patches applied I am able to compile a running hello world on
> FreeBSD using clang -integrated-as. It can compile non-running vim. I used
> to be able to compile -g version of vim and it went quite far before it
> crashed. Debug compilation is not possibly anymore, I suspect some endian
> issue (gdb says: Dwarf Error: wrong version in compilation unit header (is
> 512, should be 2))
> 
> What should I do with these patches? The first one seems committable (and
> touches only PowerPC code), the second should be ok to commit without the +2
> hack and with the GetRelocType() just asserting.
> 
> I don't have any tests for this nor I think I'll do any more significant work.
> 
> Comments? 
> 
> roman
> <powerpc-mc-md.patch><powerpc-mc.patch>_______________________________________________
> 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