WinCOFF: Transform IR expressions featuring __ImageBase into image relative relocations
authorDavid Majnemer <david.majnemer@gmail.com>
Wed, 15 Jan 2014 09:16:42 +0000 (09:16 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Wed, 15 Jan 2014 09:16:42 +0000 (09:16 +0000)
commitf62176f04759d1841e97064297337645cf536423
tree5f755842c410732dbf7231a069fb10316bdda903
parentf433beee88bc8d3e9f5bcde1e6175bf958e38f36
WinCOFF: Transform IR expressions featuring __ImageBase into image relative relocations

MSVC on x64 requires that we create image relative symbol
references to refer to RTTI data. Seeing as how there is no way to
explicitly make reference to a given relocation type in LLVM IR, pattern
match expressions of the form &foo - &__ImageBase.

Differential Revision: http://llvm-reviews.chandlerc.com/D2523

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199312 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/Operator.h
include/llvm/Target/TargetLoweringObjectFile.h
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86TargetObjectFile.cpp
lib/Target/X86/X86TargetObjectFile.h
test/MC/COFF/ir-to-imgrel.ll [new file with mode: 0644]