[llvm-commits] [PATCH] PowerPC: Fix eh_frame relocation for PIC

Adhemerval Zanella azanella at linux.vnet.ibm.com
Tue Jan 8 09:17:47 PST 2013


On 01/04/2013 05:10 PM, Adhemerval Zanella wrote:
> On 01/02/2013 06:04 PM, Hal Finkel wrote:
>> ----- Original Message -----
>>> From: "Adhemerval Zanella" <azanella at linux.vnet.ibm.com>
>>> To: llvm-commits at cs.uiuc.edu
>>> Sent: Wednesday, January 2, 2013 7:21:36 AM
>>> Subject: [llvm-commits] [PATCH] PowerPC: Fix eh_frame relocation for PIC
>>>
>>> This patch fixes the PPC eh_frame definitions for the personality and
>>> frame unwinding for PIC objects. It makes PIC build correctly creates
>>> relative relocations in the '.rela.eh_frame' segments and thus
>>> avoiding
>>> a text relocation that generates a DT_TEXTREL segments in link phase.
>>>
>>> Any tips, comments, advices?
>> Looks fine to me. Is there a reason why all of the comments start with ';;' instead of just one semicolon?
>>
>>  -Hal
> I'd have to ask Uli, since he was the one who created this testcase, but I
> presume there is no specific reason and then I removed the double semicolon.
> Pushed as r171506.

As Uli pointed me out, while the encodings I have used are not wrong they are
different from what GCC use. For PowerPC64 GCC always use PC-relative DWARF
encoding (even in non-PIC mode).

So I proposed this patch to change the encoding to use PIC-relative always. It
also adds the R_PPC64_REL32 relocation handling in MICJIT (since the eh_frame
will not generate PIC-relative relocation) and I also added the emission of the
stubs creates by the TTypeEncoding definition.

Any tips, advices, comments? 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ppc64_eh.patch
Type: text/x-patch
Size: 5592 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130108/0bd037bc/attachment.bin>


More information about the llvm-commits mailing list