OSDN Git Service

[MS][ARM64] Hoist __ImageBase handling into TargetLoweringObjectFileCOFF
authorReid Kleckner <rnk@google.com>
Tue, 12 Jun 2018 18:56:05 +0000 (18:56 +0000)
committerReid Kleckner <rnk@google.com>
Tue, 12 Jun 2018 18:56:05 +0000 (18:56 +0000)
commitff373df1792351574a3865fc7d66151159194d46
treeb54238b3a759e62233514904e0910b4f2c81d16d
parent0397fe586330aa6ceef888e3585bc95322ae413e
[MS][ARM64] Hoist __ImageBase handling into TargetLoweringObjectFileCOFF

All COFF targets should use @IMGREL32 relocations for symbol differences
against __ImageBase. Do the same for getSectionForConstant, so that
immediates lowered to globals get merged across TUs.

Patch by Chris January

Differential Revision: https://reviews.llvm.org/D47783

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334523 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
lib/CodeGen/TargetLoweringObjectFileImpl.cpp
lib/Target/X86/X86TargetMachine.cpp
lib/Target/X86/X86TargetObjectFile.cpp
lib/Target/X86/X86TargetObjectFile.h
test/MC/AArch64/ir-to-imgrel.ll [new file with mode: 0644]