[PATCH] D10940: COFF: Numerous fixes for interaction between LTO and weak externals.
Peter Collingbourne
peter at pcc.me.uk
Fri Jul 3 20:43:31 PDT 2015
pcc created this revision.
pcc added a reviewer: ruiu.
pcc added a subscriber: llvm-commits.
We were previously hitting assertion failures in the writer in cases where
a regular object file defined a weak external symbol that was defined by
a bitcode file. Because /export and /entry name mangling were implemented
using weak externals, the same problem affected mangled symbol names in
bitcode files.
The underlying cause of the problem was that weak external symbols were
being resolved before doing LTO, so the symbol table may have contained stale
references to bitcode symbols. The fix here is to defer weak external symbol
resolution until after LTO.
Also implement support for weak external symbols in bitcode files
by modelling them as replaceable DefinedBitcode symbols.
http://reviews.llvm.org/D10940
Files:
COFF/Driver.cpp
COFF/InputFiles.cpp
COFF/SymbolTable.cpp
COFF/SymbolTable.h
COFF/Symbols.cpp
COFF/Symbols.h
test/COFF/Inputs/entry-mangled.ll
test/COFF/Inputs/weak-external.ll
test/COFF/Inputs/weak-external2.ll
test/COFF/Inputs/weak-external3.ll
test/COFF/entry-mangled.test
test/COFF/weak-external.test
test/COFF/weak-external2.test
test/COFF/weak-external3.test
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10940.29042.patch
Type: text/x-patch
Size: 12035 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150704/2a3d1953/attachment.bin>
More information about the llvm-commits
mailing list