Export symbols for linux

llvm-svn: 3707
diff --git a/llvm/lib/ExecutionEngine/Makefile b/llvm/lib/ExecutionEngine/Makefile
index 4e47ee6..b5b7c3d 100644
--- a/llvm/lib/ExecutionEngine/Makefile
+++ b/llvm/lib/ExecutionEngine/Makefile
@@ -1,6 +1,10 @@
 LEVEL = ../..
 TOOLNAME = lli
 USEDLIBS = bcreader vmcore analysis.a support.a target.a transforms.a
-TOOLLINKOPTS = -ldl
+
+# Have gcc tell the linker to export symbols from the program so that
+# dynamically loaded modules can be linked against them.
+#
+TOOLLINKOPTS = -ldl $(ExportSymbols)
 
 include $(LEVEL)/Makefile.common