--- Makefile.common	11 Sep 2002 18:44:53 -0000	1.1.1.1.4.1
+++ Makefile.common	13 Sep 2002 17:05:16 -0000
@@ -134,6 +134,10 @@
 #MakeSO   := $(CXX) -G $(PROFILE)
 MakeSOO  := $(MakeSO) -O3
 
+# Have gcc tell the linker to export symbols from the program so
+# that dynamically loaded modules can be linked against them.
+ExportSymbols	:= -Wl,--export-dynamic	# Only needed by Linux
+
 # Create one .o file from a bunch of .o files...
 Relink = ld -r
 
--- tools/opt/Makefile	11 Sep 2002 18:22:32 -0000	1.2
+++ tools/opt/Makefile	13 Sep 2002 17:05:16 -0000
@@ -4,7 +4,7 @@
 USEDLIBS = bcreader bcwriter instrument profpaths scalaropts \
            ipo ipa.a datastructure.a transforms target.a analysis \
            transformutils vmcore support
-TOOLLINKOPTS = -ldl
+TOOLLINKOPTS = -ldl $(ExportSymbols)
 
 include $(LEVEL)/Makefile.common
 
