[PATCH] D25684: [LLD][ARM] Support for R_ARM_TARGET2 relocation

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 17 09:51:53 PDT 2016

peter.smith created this revision.
peter.smith added reviewers: ruiu, rafael.
peter.smith added a subscriber: llvm-commits.
Herald added subscribers: rengolin, aemerson.

The R_ARM_TARGET2 relocation is used in ARM exception tables to encode a data dependency that will only be dereferenced by code in the run-time support library. In a similar way to R_ARM_TARGET1 the handling of the relocation is target specific, it maps to one of R_ARM_ABS32, R_ARM_REL32 or R_ARM_GOT_PREL. The choice depends on the run-time library. R_ARM_GOT_PREL is used for linux and BSD, R_ARM_ABS32 and R_ARM_REL32 are used for bare-metal.

I've implemented R_ARM_TARGET2 in lld using the same command line option as GNU ld https://sourceware.org/binutils/docs/ld/ARM.html#ARM

The default is R_ARM_GOT_PREL as this is the default in Gold and the linux targeting BFD linkers.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25684.74863.patch
Type: text/x-patch
Size: 5540 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161017/c5f08909/attachment.bin>

More information about the llvm-commits mailing list