Export dynamic (weak-linked) symbols correctly.
authorTilghman Lesher <tilghman@meg.abyt.es>
Mon, 30 Nov 2009 16:53:10 +0000 (16:53 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Mon, 30 Nov 2009 16:53:10 +0000 (16:53 +0000)
(closes issue #15193)
 Reported by: eliel
 Patches:
       20091111__issue15193.diff.txt uploaded by tilghman (license 14)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@231439 65c4cc65-6c06-0410-ace0-fbb531ad65f3

Makefile.rules
main/asterisk.dynamics [new file with mode: 0644]

index 76bf0ee..10970cf 100644 (file)
@@ -49,7 +49,10 @@ CC_CFLAGS=$(PTHREAD_CFLAGS) $(_ASTCFLAGS) $(ASTCFLAGS)
 CXX_CFLAGS=$(PTHREAD_CFLAGS) $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(AST_DECLARATION_AFTER_STATEMENT),$(_ASTCFLAGS) $(ASTCFLAGS))
 
 ifeq ($(GNU_LD),1)
-SO_SUPPRESS_SYMBOLS=-Wl,--version-script,$(if $(wildcard $(subst .so,.exports,$@)),$(subst .so,.exports,$@),$(ASTTOPDIR)/default.exports)
+SO_SUPPRESS_SYMBOLS=-Wl,--version-script,$(if $(wildcard $(subst .so,.exports,$@)),$(subst .so,.exports,$@),$(ASTTOPDIR)/default.exports),--warn-common
+ifneq ($(wildcard $(subst .so,.dynamics,$@)),)
+SO_SUPPRESS_SYMBOLS+=-Wl,--dynamic-list,$(subst .so,.dynamics,$@)
+endif
 endif
 
 CC_LDFLAGS_SO=$(PTHREAD_CFLAGS) $(_ASTLDFLAGS) $(SOLINK) $(SO_SUPPRESS_SYMBOLS) $(ASTLDFLAGS)
diff --git a/main/asterisk.dynamics b/main/asterisk.dynamics
new file mode 100644 (file)
index 0000000..946007d
--- /dev/null
@@ -0,0 +1,6 @@
+{
+       ast_agi_*;
+       ast_pktccops_*;
+       ast_smdi_*;
+       ast_monitor_*;
+};