]> granicus.if.org Git - clang/commit
Recommit r324107 again.
authorRafael Espindola <rafael.espindola@gmail.com>
Wed, 7 Feb 2018 22:15:33 +0000 (22:15 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Wed, 7 Feb 2018 22:15:33 +0000 (22:15 +0000)
commit19347d7065a90fecbe8efd7f9f48b91f0f1319e6
treeeadb4566628040bf827557cee2d8c405942d9332
parent0917b6d8c8400945667d897adc38d5a65381f727
Recommit r324107 again.

The difference from the previous try is that we no longer directly
access function declarations from position independent executables. It
should work, but currently doesn't with some linkers.

It now includes a fix to not mark available_externally definitions as
dso_local.

Original message:

Start setting dso_local in clang.

This starts adding dso_local to clang.

The hope is to eventually have TargetMachine::shouldAssumeDsoLocal go
away. My objective for now is to move enough of it to clang to remove
the need for the TargetMachine one to handle PIE copy relocations and
-fno-plt. With that it should then be easy to implement a
-fno-copy-reloc in clang.

This patch just adds the cases where we assume a symbol to be local
based on the file being compiled for an executable or a shared
library.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@324535 91177308-0d34-0410-b5e6-96231b3b80d8
22 files changed:
lib/CodeGen/CGDecl.cpp
lib/CodeGen/CGVTT.cpp
lib/CodeGen/CGVTables.cpp
lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/CodeGenModule.h
lib/CodeGen/ItaniumCXXABI.cpp
test/CodeGen/dso-local-executable.c [new file with mode: 0644]
test/CodeGen/mbackchain-2.c
test/CodeGen/mbackchain-3.c
test/CodeGen/mips-vector-return.c
test/CodeGen/split-stacks.c
test/CodeGenCXX/debug-info-static-member.cpp
test/CodeGenCXX/debug-info-template.cpp
test/CodeGenCXX/dso-local-executable.cpp [new file with mode: 0644]
test/CodeGenCXX/float16-declarations.cpp
test/CodeGenCXX/split-stacks.cpp
test/Driver/lanai-unknown-unknown.cpp
test/Driver/le32-unknown-nacl.cpp
test/Driver/le64-unknown-unknown.cpp
test/Driver/riscv32-toolchain.c
test/Driver/riscv64-toolchain.c
test/Frontend/ast-codegen.c