diff options
author | Fangrui Song <maskray@google.com> | 2020-01-01 00:15:28 -0800 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2020-01-01 00:50:18 -0800 |
commit | d2bb8c16e711602481c8b33d0e2ccc9994eb6641 (patch) | |
tree | 01f3e95e28811a0253d6b4a206d25edd8edee125 /clang/lib/CodeGen | |
parent | 47e3d3ec0c5607ae3bc6181537c0622080f3af27 (diff) | |
download | bcm5719-llvm-d2bb8c16e711602481c8b33d0e2ccc9994eb6641.tar.gz bcm5719-llvm-d2bb8c16e711602481c8b33d0e2ccc9994eb6641.zip |
[MC][TargetMachine] Delete MCTargetOptions::MCPIECopyRelocations
clang/lib/CodeGen/CodeGenModule performs the -mpie-copy-relocations
check and sets dso_local on applicable global variables. We don't need
to duplicate the work in TargetMachine shouldAssumeDSOLocal.
Verified that -mpie-copy-relocations can still emit PC relative
relocations for external variable accesses.
clang -target x86_64 -fpie -mpie-copy-relocations -c => R_X86_64_PC32
clang -target aarch64 -fpie -mpie-copy-relocations -c => R_AARCH64_ADR_PREL_PG_HI21+R_AARCH64_LDST64_ABS_LO12_NC
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/BackendUtil.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index 9b1e9178834..645ef0165a5 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -485,7 +485,6 @@ static void initTargetOptions(llvm::TargetOptions &Options, Options.MCOptions.MCNoExecStack = CodeGenOpts.NoExecStack; Options.MCOptions.MCIncrementalLinkerCompatible = CodeGenOpts.IncrementalLinkerCompatible; - Options.MCOptions.MCPIECopyRelocations = CodeGenOpts.PIECopyRelocations; Options.MCOptions.MCFatalWarnings = CodeGenOpts.FatalWarnings; Options.MCOptions.MCNoWarn = CodeGenOpts.NoWarn; Options.MCOptions.AsmVerbose = CodeGenOpts.AsmVerbose; |