summaryrefslogtreecommitdiffstats
path: root/lld/ELF/OutputSections.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2016-04-07 19:24:51 +0000
committerRui Ueyama <ruiu@google.com>2016-04-07 19:24:51 +0000
commitf8baa6605674e1a1ff3fd60b750e42291a4442c5 (patch)
treefa77552d5ac507bcbf461c7cfb662c5527616a59 /lld/ELF/OutputSections.cpp
parent43b7b5b846e17011e94569bf76e25beada30ca56 (diff)
downloadbcm5719-llvm-f8baa6605674e1a1ff3fd60b750e42291a4442c5.tar.gz
bcm5719-llvm-f8baa6605674e1a1ff3fd60b750e42291a4442c5.zip
ELF: Implement --start-lib and --end-lib
start-lib and end-lib are options to link object files in the same semantics as archive files. If an object is in start-lib and end-lib, the object is linked only when the file is needed to resolve undefined symbols. That means, if an object is in start-lib and end-lib, it behaves as if it were in an archive file. In this patch, I introduced a new notion, LazyObjectFile. That is analogous to Archive file type, but that works for a single object file instead of for an archive file. http://reviews.llvm.org/D18814 llvm-svn: 265710
Diffstat (limited to 'lld/ELF/OutputSections.cpp')
-rw-r--r--lld/ELF/OutputSections.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp
index cb82e22eec9..f79a1d3a923 100644
--- a/lld/ELF/OutputSections.cpp
+++ b/lld/ELF/OutputSections.cpp
@@ -1501,7 +1501,8 @@ SymbolTableSection<ELFT>::getOutputSection(SymbolBody *Sym) {
break;
case SymbolBody::UndefinedElfKind:
case SymbolBody::UndefinedBitcodeKind:
- case SymbolBody::LazyKind:
+ case SymbolBody::LazyArchiveKind:
+ case SymbolBody::LazyObjectKind:
break;
case SymbolBody::DefinedBitcodeKind:
llvm_unreachable("should have been replaced");
OpenPOWER on IntegriCloud