ELF2: Fix BSD's __progname symbol issue.
BSD's DSO files have undefined symbol "__progname" which is defined
in crt1.o. On that system, both user programs and system shared
libraries depend on each other.
In general, we need to put symbols defined by user programs which are
referenced by shared libraries to user program's .dynsym.
http://reviews.llvm.org/D13637
llvm-svn: 250176
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index e0136d2..346ab44 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -227,5 +227,6 @@
Config->OutputFile = "a.out";
// Write the result to the file.
+ Symtab.finalize();
writeResult<ELFT>(&Symtab);
}