1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/tools
Tobias Edler von Koch 80cff62afe LTO: Pass SF_Executable flag through to InputFile::Symbol
Summary:
The linker needs to be able to determine whether a symbol is text or data to
handle the case of a common being overridden by a strong definition in an
archive. If the archive contains a text member of the same name as the common,
that function is discarded. However, if the archive contains a data member of
the same name, that strong definition overrides the common. This is a behavior
of ld.bfd, which the Qualcomm linker also supports in LTO.

Here's a test case to illustrate:

####

cat > 1.c << \!
int blah;
!

cat > 2.c << \!
int blah() {
  return 0;
}
!

cat > 3.c << \!
int blah = 20;
!

clang -c 1.c
clang -c 2.c
clang -c 3.c

ar cr lib.a 2.o 3.o
ld 1.o lib.a -t

####

The correct output is:

1.o
(lib.a)3.o

Thanks to Shankar Easwaran and Hemant Kulkarni for the test case!

Reviewers: mehdi_amini, rafael, pcc, davide

Reviewed By: pcc

Subscribers: davide, llvm-commits, inglorion

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

llvm-svn: 300205
2017-04-13 16:24:14 +00:00
..
bugpoint Module::getOrInsertFunction is using C-style vararg instead of variadic templates. 2017-04-11 15:01:18 +00:00
bugpoint-passes
dsymutil Spelling mistakes in comments. NFCI. 2017-03-30 12:59:53 +00:00
gold Re-apply r299168 and r299169 now that the libdeps are fixed. 2017-03-31 04:47:07 +00:00
llc Revert "Feature generic option to setup start/stop-after/before" 2017-04-01 01:26:24 +00:00
lli Module::getOrInsertFunction is using C-style vararg instead of variadic templates. 2017-04-11 15:01:18 +00:00
llvm-ar [llvm-ar] Remove unneeded std::, NFCI. 2017-04-05 15:05:05 +00:00
llvm-as
llvm-as-fuzzer
llvm-bcanalyzer Bitcode: Remove reader support for MODULE_CODE_PURGEVALS. 2017-04-03 17:58:48 +00:00
llvm-c-test Spelling mistakes in comments. NFCI. 2017-03-30 12:59:53 +00:00
llvm-cat Avoid some string copies, NFC 2017-04-11 22:11:46 +00:00
llvm-config [CMake] Use variable interpolation instead of string concatenation 2017-03-22 12:06:11 +00:00
llvm-cov Use the new member accessors of llvm::enumerate. 2017-03-13 16:32:08 +00:00
llvm-cxxdump
llvm-cxxfilt c++filt: support COFF import thunks 2017-03-22 21:15:19 +00:00
llvm-diff [IR] Redesign the case iterator in SwitchInst to actually be an iterator 2017-04-12 07:27:28 +00:00
llvm-dis
llvm-dwarfdump
llvm-dwp
llvm-extract [llvm-extract] Add option for recursive extraction 2017-04-06 20:51:40 +00:00
llvm-go
llvm-jitlistener
llvm-link Remove unused lambda capture 2017-03-13 21:46:14 +00:00
llvm-lto Add support for -fno-builtin to LTO and ThinLTO to libLTO 2017-03-28 18:55:44 +00:00
llvm-lto2 LTO: Pass SF_Executable flag through to InputFile::Symbol 2017-04-13 16:24:14 +00:00
llvm-mc [DWARFv5] llvm-mc support for new unit header. 2017-02-28 23:40:46 +00:00
llvm-mc-assemble-fuzzer llvm-mc-fuzzer: add support for assembly 2017-02-27 06:22:17 +00:00
llvm-mc-disassemble-fuzzer llvm-mc-fuzzer: add support for assembly 2017-02-27 06:22:17 +00:00
llvm-mcmarkup
llvm-modextract
llvm-nm
llvm-objdump Add the rest of the error checking for Mach-O dyld compact bind entry errors 2017-03-20 19:46:55 +00:00
llvm-opt-report
llvm-pdbdump Remove some unused private fields. 2017-04-13 02:28:17 +00:00
llvm-profdata Resubmit r297897: [PGO] Value profile for size of memory intrinsic calls 2017-03-16 21:15:48 +00:00
llvm-readobj [llvm-readobj] Only print the real size of the note 2017-04-05 18:55:50 +00:00
llvm-rtdyld
llvm-shlib Add check for BSD when setting LIB_NAMES for GNU ld 2017-03-26 05:58:48 +00:00
llvm-size
llvm-split
llvm-stress Allow DataLayout to specify addrspace for allocas. 2017-04-10 22:27:50 +00:00
llvm-strings
llvm-symbolizer
llvm-xray [XRay][tools] Remove some assertions in llvm-xray graph 2017-03-31 01:56:45 +00:00
lto Spelling mistakes in comments. NFCI. 2017-03-30 12:59:53 +00:00
msbuild Create msbuild only when using MSVC 2017-03-16 20:24:14 +00:00
obj2yaml [WebAssembly] Improve support for WebAssembly binary format 2017-03-30 19:44:09 +00:00
opt [ThinLTO] Add support for emitting minimized bitcode for thin link 2017-03-23 19:47:39 +00:00
sancov [sancov] Fix broken links and displaced coloring in coverage-report-server.py 2017-03-20 14:06:04 +00:00
sanstats
verify-uselistorder
xcode-toolchain
yaml2obj [yaml2obj] Factor out error handling code. 2017-04-05 15:18:16 +00:00
CMakeLists.txt
LLVMBuild.txt