diff options
Diffstat (limited to 'tools/llvm-lto/llvm-lto.cpp')
-rw-r--r-- | tools/llvm-lto/llvm-lto.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/llvm-lto/llvm-lto.cpp b/tools/llvm-lto/llvm-lto.cpp index 3ecd13f5c7..1d03fa62a8 100644 --- a/tools/llvm-lto/llvm-lto.cpp +++ b/tools/llvm-lto/llvm-lto.cpp @@ -50,6 +50,10 @@ ExportedSymbols("exported-symbol", cl::desc("Symbol to export from the resulting object file"), cl::ZeroOrMore); +static cl::list<std::string> +DSOSymbols("dso-symbol", + cl::desc("Symbol to put in the symtab in the resulting dso"), + cl::ZeroOrMore); int main(int argc, char **argv) { // Print a stack trace if we signal out. @@ -117,6 +121,10 @@ int main(int argc, char **argv) { for (unsigned i = 0; i < ExportedSymbols.size(); ++i) CodeGen.addMustPreserveSymbol(ExportedSymbols[i].c_str()); + // Add all the dso symbols to the table of symbols to expose. + for (unsigned i = 0; i < DSOSymbols.size(); ++i) + CodeGen.addDSOSymbol(DSOSymbols[i].c_str()); + if (!OutputFilename.empty()) { size_t len = 0; std::string ErrorInfo; |