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

Jim Grosbach grosbach at apple.com
Tue Jan 10 13:52:37 PST 2012


Hi James,

There seems to be something missing from the patch? I don't see any definition for VK_ARM_TARGET1, any handling for mapping the variant kind to a relocation type or any of that sort of thing.

-Jim

On Jan 4, 2012, at 11:12 PM, Evan Cheng wrote:

> 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
> 





More information about the llvm-commits mailing list