summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMTargetObjectFile.h
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2016-04-22 20:40:10 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2016-04-22 20:40:10 +0000
commit265ebd7d70496049d49021b4eb5eabffcf291b7d (patch)
tree4812863753534f9ff90358e0e120efa8bbcac6b8 /llvm/lib/Target/ARM/ARMTargetObjectFile.h
parenteedef73b633496ca52af265b472519f0e385a7d2 (diff)
downloadbcm5719-llvm-265ebd7d70496049d49021b4eb5eabffcf291b7d.tar.gz
bcm5719-llvm-265ebd7d70496049d49021b4eb5eabffcf291b7d.zip
CodeGen: Use PLT relocations for relative references to unnamed_addr functions.
The relative vtable ABI (PR26723) needs PLT relocations to refer to virtual functions defined in other DSOs. The unnamed_addr attribute means that the function's address is not significant, so we're allowed to substitute it with the address of a PLT entry. Also includes a bonus feature: addends for COFF image-relative references. Differential Revision: http://reviews.llvm.org/D17938 llvm-svn: 267211
Diffstat (limited to 'llvm/lib/Target/ARM/ARMTargetObjectFile.h')
-rw-r--r--llvm/lib/Target/ARM/ARMTargetObjectFile.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/ARM/ARMTargetObjectFile.h b/llvm/lib/Target/ARM/ARMTargetObjectFile.h
index 98e8763c470..b1db201cb30 100644
--- a/llvm/lib/Target/ARM/ARMTargetObjectFile.h
+++ b/llvm/lib/Target/ARM/ARMTargetObjectFile.h
@@ -21,10 +21,10 @@ class ARMElfTargetObjectFile : public TargetLoweringObjectFileELF {
protected:
const MCSection *AttributesSection;
public:
- ARMElfTargetObjectFile() :
- TargetLoweringObjectFileELF(),
- AttributesSection(nullptr)
- {}
+ ARMElfTargetObjectFile()
+ : TargetLoweringObjectFileELF(), AttributesSection(nullptr) {
+ PLTRelativeVariantKind = MCSymbolRefExpr::VK_ARM_PREL31;
+ }
void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
OpenPOWER on IntegriCloud