[asterisk-commits] kpfleming: branch kpfleming/export-symbol-prefix r255902 - in /team/kpfleming...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Apr 2 12:58:01 CDT 2010


Author: kpfleming
Date: Fri Apr  2 12:57:57 2010
New Revision: 255902

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=255902
Log:
save some work in progress to allow platforms that have symbol prefixes to work properly in the linker version scripts that suppress symbols


Added:
    team/kpfleming/export-symbol-prefix/
      - copied from r255892, trunk/
    team/kpfleming/export-symbol-prefix/apps/app_voicemail.exports.in
      - copied unchanged from r255892, trunk/apps/app_voicemail.exports
    team/kpfleming/export-symbol-prefix/main/asterisk.exports.in
      - copied unchanged from r255892, trunk/main/asterisk.exports
    team/kpfleming/export-symbol-prefix/res/res_adsi.exports.in
      - copied unchanged from r255892, trunk/res/res_adsi.exports
    team/kpfleming/export-symbol-prefix/res/res_ael_share.exports.in
      - copied unchanged from r255892, trunk/res/res_ael_share.exports
    team/kpfleming/export-symbol-prefix/res/res_agi.exports.in
      - copied unchanged from r255892, trunk/res/res_agi.exports
    team/kpfleming/export-symbol-prefix/res/res_calendar.exports.in
      - copied unchanged from r255892, trunk/res/res_calendar.exports
    team/kpfleming/export-symbol-prefix/res/res_fax.exports.in
      - copied unchanged from r255892, trunk/res/res_fax.exports
    team/kpfleming/export-symbol-prefix/res/res_features.exports.in
      - copied unchanged from r255892, trunk/res/res_features.exports
    team/kpfleming/export-symbol-prefix/res/res_jabber.exports.in
      - copied unchanged from r255892, trunk/res/res_jabber.exports
    team/kpfleming/export-symbol-prefix/res/res_monitor.exports.in
      - copied unchanged from r255892, trunk/res/res_monitor.exports
    team/kpfleming/export-symbol-prefix/res/res_odbc.exports.in
      - copied unchanged from r255892, trunk/res/res_odbc.exports
    team/kpfleming/export-symbol-prefix/res/res_pktccops.exports.in
      - copied unchanged from r255892, trunk/res/res_pktccops.exports
    team/kpfleming/export-symbol-prefix/res/res_smdi.exports.in
      - copied unchanged from r255892, trunk/res/res_smdi.exports
    team/kpfleming/export-symbol-prefix/res/res_speech.exports.in
      - copied unchanged from r255892, trunk/res/res_speech.exports
Removed:
    team/kpfleming/export-symbol-prefix/apps/app_voicemail.exports
    team/kpfleming/export-symbol-prefix/main/asterisk.exports
    team/kpfleming/export-symbol-prefix/res/res_adsi.exports
    team/kpfleming/export-symbol-prefix/res/res_ael_share.exports
    team/kpfleming/export-symbol-prefix/res/res_agi.exports
    team/kpfleming/export-symbol-prefix/res/res_calendar.exports
    team/kpfleming/export-symbol-prefix/res/res_fax.exports
    team/kpfleming/export-symbol-prefix/res/res_features.exports
    team/kpfleming/export-symbol-prefix/res/res_jabber.exports
    team/kpfleming/export-symbol-prefix/res/res_monitor.exports
    team/kpfleming/export-symbol-prefix/res/res_odbc.exports
    team/kpfleming/export-symbol-prefix/res/res_pktccops.exports
    team/kpfleming/export-symbol-prefix/res/res_smdi.exports
    team/kpfleming/export-symbol-prefix/res/res_speech.exports
Modified:
    team/kpfleming/export-symbol-prefix/Makefile
    team/kpfleming/export-symbol-prefix/Makefile.moddir_rules
    team/kpfleming/export-symbol-prefix/Makefile.rules

Modified: team/kpfleming/export-symbol-prefix/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/kpfleming/export-symbol-prefix/Makefile?view=diff&rev=255902&r1=255892&r2=255902
==============================================================================
--- team/kpfleming/export-symbol-prefix/Makefile (original)
+++ team/kpfleming/export-symbol-prefix/Makefile Fri Apr  2 12:57:57 2010
@@ -174,6 +174,14 @@
 HTTP_DOCSDIR=/var/www/html
 # Determine by a grep 'ScriptAlias' of your Apache httpd.conf file
 HTTP_CGIDIR=/var/www/cgi-bin
+
+# If your platform's linker expects a prefix on symbols generated from compiling C
+# source files, set LINKER_SYMBOL_PREFIX to that value. On some systems, exported symbols
+# from C source files are prefixed with '_', for example. If this value is not set
+# properly, the linker scripts that live in the '*.exports' files in various places
+# in this tree will unintentionally suppress symbols that should be visible
+# in the final binary objects.
+LINKER_SYMBOL_PREFIX=
 
 # Uncomment this to use the older DSP routines
 #_ASTCFLAGS+=-DOLD_DSP_ROUTINES

Modified: team/kpfleming/export-symbol-prefix/Makefile.moddir_rules
URL: http://svnview.digium.com/svn/asterisk/team/kpfleming/export-symbol-prefix/Makefile.moddir_rules?view=diff&rev=255902&r1=255892&r2=255902
==============================================================================
--- team/kpfleming/export-symbol-prefix/Makefile.moddir_rules (original)
+++ team/kpfleming/export-symbol-prefix/Makefile.moddir_rules Fri Apr  2 12:57:57 2010
@@ -76,6 +76,8 @@
 
 $(EMBEDDED_MODS:%=%.o): _ASTCFLAGS+=-DEMBEDDED_MODULE=$*
 
+$(LOADABLE_MODS:%=%.so): $(if $(wildcard $(subst .so,.exports,$*)),$(subst .so,.exports,$*))
+
 $(addsuffix .so,$(filter $(LOADABLE_MODS),$(C_MODS))): %.so: %.o
 $(addsuffix .so,$(filter $(LOADABLE_MODS),$(CC_MODS))): %.so: %.oo
 
@@ -129,6 +131,7 @@
 dist-clean::
 	rm -f .*.moduleinfo .moduleinfo
 	rm -f .*.makeopts .makeopts
+	rm -f *.exports
 
 .%.moduleinfo: %.c
 	@echo "<member name=\"$*\" displayname=\"$(shell $(GREP) -e AST_MODULE_INFO $< | head -n 1 | cut -d '"' -f 2)\" remove_on_change=\"$(SUBDIR)/$*.o $(SUBDIR)/$*.so\">" > $@

Modified: team/kpfleming/export-symbol-prefix/Makefile.rules
URL: http://svnview.digium.com/svn/asterisk/team/kpfleming/export-symbol-prefix/Makefile.rules?view=diff&rev=255902&r1=255892&r2=255902
==============================================================================
--- team/kpfleming/export-symbol-prefix/Makefile.rules (original)
+++ team/kpfleming/export-symbol-prefix/Makefile.rules Fri Apr  2 12:57:57 2010
@@ -3,7 +3,7 @@
 # 
 # Makefile rules
 #
-# Copyright (C) 2006-2008, Digium, Inc.
+# Copyright (C) 2006-2010, Digium, Inc.
 #
 # Kevin P. Fleming <kpfleming at digium.com>
 #
@@ -140,4 +140,8 @@
 	$(ECHO_PREFIX) echo "   [LD] $^ -> $@"
 	$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(PTHREAD_CFLAGS) $(_ASTLDFLAGS) $^ $(CXX_LIBS) $(ASTLDFLAGS)
 
+%.exports: %.exports.in
+	$(ECHO_PREFIX) echo "   [AWK] $< -> $@"
+	$(CMD_PREFIX) $(AWK) '{sub("LINKER_SYMBOL_PREFIX", "$(LINKER_SYMBOL_PREFIX)"); print;}' $< > $@
+
 dist-clean:: clean




More information about the asterisk-commits mailing list