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

James Molloy james.molloy at arm.com
Wed Jan 4 23:56:05 PST 2012


Hi Evan,

 

Has this been reviewed?

 

No, not yet. I was going to ping about it today - I've been away as most of
you have for the Christmas vacation.

 

I have no idea on the correct behaviour for iOS, but this is an ELF specific
relocation type. Perhaps the TARGET1 fixup should be treated as ARM_ABS32 in
the MachO backend?

 

Cheers,

 

James

 

 

From: Evan Cheng [mailto:evan.cheng at apple.com] 
Sent: 05 January 2012 07:13
To: James Molloy
Cc: llvm-commits at cs.uiuc.edu for LLVM; Jim Grosbach; Owen Anderson; Kevin
Enderby
Subject: Re: [llvm-commits] PATCH: ARM_TARGET1 relocation for C++ global
constructors

 

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/20120105/7572f11f/attachment.html>


More information about the llvm-commits mailing list