[llvm-commits] [PATCH] PPC32: Add mapping for darwin/gas modifier in elf object writer

Bill Schmidt wschmidt at linux.vnet.ibm.com
Thu Jan 3 11:35:06 PST 2013



On Thu, 2013-01-03 at 17:18 -0200, Adhemerval Zanella wrote:
> Hi Kai,
> 
> The PPC32 backend it not being worked right now, so I believe he is broken. But if you
> want to chase it down, I suggest you to look on how the PPC64 implements the relocation
> model for mcmodel=small and mcmodel=medium. I implemented the mcmodel=small
> (r166677<http://permalink.gmane.org/gmane.comp.compilers.llvm.cvs/124395>) and Bill Schmidt the mcmodel=small ( r168708).
> 

Hi Kai,

Let me just second this.  We've been working for the last several months
on repairing the PPC64 ELF back end and getting it into ABI compliance.
The PPC32 ELF back end is in quite bad shape comparatively, and you will
probably be better off not targeting it for now (unless you are excited
about getting in and fixing it, in which case welcome aboard! ;) .)  At
some point we may start digging into PPC32, but I doubt that will be for
at least several months.  We're very focused on a working PPC64 target
for now.

Bill

> On 01/03/2013 09:15 AM, Kai wrote:
> > Hi Hal!
> >
> > Thanks for the hint to the test case. That was the information I needed. :-)
> >
> > I attach the patch again, this time with a test.
> > A problem still remains: the PPC32 ELF write is really broken. The last line of the test checks for a wrong value (the right value is noted as a comment).
> > Root cause is that 64bit relocation types are created even in 32bit mode. I am unsure about the right strategy to fix this. E.g. we could map the MCSymbolRefExp inside PPCELFObjectWriter::getRelocTypeInner() to different relocation types depending on 32/64 bit mode.
> >
> > Regards
> > Kai
> >
> > On 02.01.2013 21:31, Hal Finkel wrote:
> >> ----- Original Message -----
> >>> From: "Hal Finkel" <hfinkel at anl.gov>
> >>> To: "Kai" <kai at redstar.de>
> >>> Cc: llvm-commits at cs.uiuc.edu
> >>> Sent: Wednesday, January 2, 2013 2:12:01 PM
> >>> Subject: Re: [llvm-commits] [PATCH] PPC32: Add mapping for darwin/gas modifier in elf object writer
> >>>
> >>> ----- Original Message -----
> >>>> From: "Kai" <kai at redstar.de>
> >>>> To: llvm-commits at cs.uiuc.edu
> >>>> Sent: Sunday, December 30, 2012 5:49:04 PM
> >>>> Subject: [llvm-commits] [PATCH] PPC32: Add mapping for darwin/gas
> >>>> modifier in elf object writer
> >>>>
> >>>> Hi!
> >>>>
> >>>> The VK_PPC_DARWIN_HA16/LO16 and :VK_PPC_GAS_HA16/LO16 modifier are
> >>>> not
> >>>> mapped in PPCELFObjectWriter.cpp. They should be mapped to
> >>>> R_PPC_ADDR16_HA and R_PPC_ADDR16_LO. The attached patch adds these
> >>>> mappings.
> >>>
> >>> Kai,
> >>>
> >>> The patch looks fine; I'd prefer that we have a test case. I think
> >>> that you can make use of the elf-dump utility to generate one; see,
> >>> for example, test/MC/PowerPC/ppc64-initial-cfa.ll
> >>
> >> Actually, test/MC/PowerPC/ppc64-relocs-01.ll may be a better example.
> >>
> >>   -Hal
> >>
> >>>
> >>> Thanks again,
> >>> Hal
> >>>
> >>>>
> >>>> Regards
> >>>>
> >>>> Kai
> >>>>
> >>>> _______________________________________________
> >>>> llvm-commits mailing list
> >>>> llvm-commits at cs.uiuc.edu
> >>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >>>>
> >>>
> >>> -- 
> >>> Hal Finkel
> >>> Postdoctoral Appointee
> >>> Leadership Computing Facility
> >>> Argonne National Laboratory
> >>> _______________________________________________
> >>> llvm-commits mailing list
> >>> llvm-commits at cs.uiuc.edu
> >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >>>
> >>
> >
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 
> _______________________________________________
> 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