[llvm-commits] PATCH: ARM_TARGET1 relocation for C++ global constructors

Evan Cheng evan.cheng at apple.com
Wed Jan 4 23:12:42 PST 2012


Has this been reviewed?

I'm not sure if this patch is correct for all platforms, e.g. iOS. Jim, Kevin, and Owen, do you guys know?

Evan

On Dec 21, 2011, at 7:12 AM, James Molloy wrote:

> Hi,
>  
> Attached is a patch to cause the relocations for C++ global/static constructor thunks to be outputted properly on ARM. The ABI states that these thunks should have an R_ARM_TARGET1 relocation type applied to them for portability reasons. Currently they’re emitted as normal global variables so get an R_ARM_ABS32.
>  
> I’ve implemented this by creating a new overridable hook, “EmitXXStructor()”, in the AsmPrinter. For all targets this defaults to EmitGlobalConstant as usual, but ARM overrides it to emit a constant with this specific relocation type.
>  
> Am I OK to commit?
>  
> Cheers,
>  
> James
> <reloc_arm_target1.patch>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120104/4eeb88ce/attachment.html>


More information about the llvm-commits mailing list