diff options
| author | Martin Storsjo <martin@martin.st> | 2019-08-20 18:58:05 +0000 |
|---|---|---|
| committer | Martin Storsjo <martin@martin.st> | 2019-08-20 18:58:05 +0000 |
| commit | 514f3a122d659dc45f272a1a519387680e221ffd (patch) | |
| tree | ecb467937ae8c870af45822eab5e3abb4f1fff7a /llvm/lib/Target/X86/X86Subtarget.cpp | |
| parent | 8a91aa53a062a03e19e26e896ffdd10ffc67801b (diff) | |
| download | bcm5719-llvm-514f3a122d659dc45f272a1a519387680e221ffd.tar.gz bcm5719-llvm-514f3a122d659dc45f272a1a519387680e221ffd.zip | |
[TargetMachine] Don't try to create COFFSTUB references on windows on non-COFF
This avoids spurious relocation types for windows/elf targets.
Differential Revision: https://reviews.llvm.org/D66401
llvm-svn: 369426
Diffstat (limited to 'llvm/lib/Target/X86/X86Subtarget.cpp')
| -rw-r--r-- | llvm/lib/Target/X86/X86Subtarget.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86Subtarget.cpp b/llvm/lib/Target/X86/X86Subtarget.cpp index d6d23abf045..c826fdf6964 100644 --- a/llvm/lib/Target/X86/X86Subtarget.cpp +++ b/llvm/lib/Target/X86/X86Subtarget.cpp @@ -146,6 +146,9 @@ unsigned char X86Subtarget::classifyGlobalReference(const GlobalValue *GV, return X86II::MO_DLLIMPORT; return X86II::MO_COFFSTUB; } + // Some JIT users use *-win32-elf triples; these shouldn't use GOT tables. + if (isOSWindows()) + return X86II::MO_NO_FLAG; if (is64Bit()) { // ELF supports a large, truly PIC code model with non-PC relative GOT |

