[svn-commits] kpfleming: trunk r255906 - in /trunk: ./ addons/ apps/ bridges/ build_tools/ ...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Apr 2 13:58:01 CDT 2010


Author: kpfleming
Date: Fri Apr  2 13:57:58 2010
New Revision: 255906

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=255906
Log:
Allow symbol export filtering to work properly on platforms that have symbol prefixes.

Some platforms prefix externally-visible symbols in object files generated
from C sources (most commonly, '_' is the prefix). On these platforms,
the existing symbol export filtering process ends up suppressing all the symbols
that are supposed to be left visible. This patch allows the prefix string
to be supplied to the top-level Makefile in the LINKER_SYMBOL_PREFIX variable,
and then generates the linker scripts as required to include the prefix
supplied.


Added:
    trunk/apps/app_voicemail.exports.in
      - copied unchanged from r255905, team/kpfleming/export-symbol-prefix/apps/app_voicemail.exports.in
    trunk/build_tools/make_linker_version_script
      - copied unchanged from r255905, team/kpfleming/export-symbol-prefix/build_tools/make_linker_version_script
    trunk/main/asterisk.exports.in
      - copied unchanged from r255905, team/kpfleming/export-symbol-prefix/main/asterisk.exports.in
    trunk/res/res_adsi.exports.in
      - copied unchanged from r255905, team/kpfleming/export-symbol-prefix/res/res_adsi.exports.in
    trunk/res/res_ael_share.exports.in
      - copied unchanged from r255905, team/kpfleming/export-symbol-prefix/res/res_ael_share.exports.in
    trunk/res/res_agi.exports.in
      - copied unchanged from r255905, team/kpfleming/export-symbol-prefix/res/res_agi.exports.in
    trunk/res/res_calendar.exports.in
      - copied unchanged from r255905, team/kpfleming/export-symbol-prefix/res/res_calendar.exports.in
    trunk/res/res_fax.exports.in
      - copied unchanged from r255905, team/kpfleming/export-symbol-prefix/res/res_fax.exports.in
    trunk/res/res_features.exports.in
      - copied unchanged from r255905, team/kpfleming/export-symbol-prefix/res/res_features.exports.in
    trunk/res/res_jabber.exports.in
      - copied unchanged from r255905, team/kpfleming/export-symbol-prefix/res/res_jabber.exports.in
    trunk/res/res_monitor.exports.in
      - copied unchanged from r255905, team/kpfleming/export-symbol-prefix/res/res_monitor.exports.in
    trunk/res/res_odbc.exports.in
      - copied unchanged from r255905, team/kpfleming/export-symbol-prefix/res/res_odbc.exports.in
    trunk/res/res_pktccops.exports.in
      - copied unchanged from r255905, team/kpfleming/export-symbol-prefix/res/res_pktccops.exports.in
    trunk/res/res_smdi.exports.in
      - copied unchanged from r255905, team/kpfleming/export-symbol-prefix/res/res_smdi.exports.in
    trunk/res/res_speech.exports.in
      - copied unchanged from r255905, team/kpfleming/export-symbol-prefix/res/res_speech.exports.in
Removed:
    trunk/apps/app_voicemail.exports
    trunk/main/asterisk.exports
    trunk/res/res_adsi.exports
    trunk/res/res_ael_share.exports
    trunk/res/res_agi.exports
    trunk/res/res_calendar.exports
    trunk/res/res_fax.exports
    trunk/res/res_features.exports
    trunk/res/res_jabber.exports
    trunk/res/res_monitor.exports
    trunk/res/res_odbc.exports
    trunk/res/res_pktccops.exports
    trunk/res/res_smdi.exports
    trunk/res/res_speech.exports
Modified:
    trunk/Makefile
    trunk/Makefile.moddir_rules
    trunk/Makefile.rules
    trunk/addons/   (props changed)
    trunk/apps/   (props changed)
    trunk/bridges/   (props changed)
    trunk/cdr/   (props changed)
    trunk/cel/   (props changed)
    trunk/channels/   (props changed)
    trunk/codecs/   (props changed)
    trunk/formats/   (props changed)
    trunk/funcs/   (props changed)
    trunk/main/   (props changed)
    trunk/main/Makefile
    trunk/pbx/   (props changed)
    trunk/res/   (props changed)
    trunk/tests/   (props changed)
    trunk/utils/   (props changed)

Modified: trunk/Makefile
URL: http://svnview.digium.com/svn/asterisk/trunk/Makefile?view=diff&rev=255906&r1=255905&r2=255906
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Fri Apr  2 13:57:58 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: trunk/Makefile.moddir_rules
URL: http://svnview.digium.com/svn/asterisk/trunk/Makefile.moddir_rules?view=diff&rev=255906&r1=255905&r2=255906
==============================================================================
--- trunk/Makefile.moddir_rules (original)
+++ trunk/Makefile.moddir_rules Fri Apr  2 13:57:58 2010
@@ -129,6 +129,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: trunk/Makefile.rules
URL: http://svnview.digium.com/svn/asterisk/trunk/Makefile.rules?view=diff&rev=255906&r1=255905&r2=255906
==============================================================================
--- trunk/Makefile.rules (original)
+++ trunk/Makefile.rules Fri Apr  2 13:57:58 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>
 #
@@ -117,10 +117,16 @@
 	$(CMD_PREFIX) $(CXX) -o $@ -E $< $(MAKE_DEPS) $(CXX_CFLAGS)
 
 %.so: %.o
+ifeq ($(GNU_LD),1)
+	$(CMD_PREFIX) $(ASTTOPDIR)/build_tools/make_linker_version_script $* $(LINKER_SYMBOL_PREFIX)
+endif
 	$(ECHO_PREFIX) echo "   [LD] $^ -> $@"
 	$(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(CC_LDFLAGS_SO) $^ $(CC_LIBS)
 
 %.so: %.oo
+ifeq ($(GNU_LD),1)
+	$(CMD_PREFIX) $(ASTTOPDIR)/build_tools/make_linker_version_script $* $(LINKER_SYMBOL_PREFIX)
+endif
 	$(ECHO_PREFIX) echo "   [LDXX] $^ -> $@"
 	$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(CXX_LDFLAGS_SO) $^ $(CXX_LIBS)
 

Propchange: trunk/addons/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Apr  2 13:57:58 2010
@@ -7,5 +7,6 @@
 *.moduleinfo
 *.s
 *.so
+*.exports
 modules.link
 

Propchange: trunk/apps/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Apr  2 13:57:58 2010
@@ -7,4 +7,5 @@
 *.moduleinfo
 *.s
 *.so
+*.exports
 modules.link

Propchange: trunk/bridges/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Apr  2 13:57:58 2010
@@ -7,5 +7,6 @@
 *.moduleinfo
 *.s
 *.so
+*.exports
 modules.link
 

Propchange: trunk/cdr/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Apr  2 13:57:58 2010
@@ -7,4 +7,5 @@
 *.moduleinfo
 *.s
 *.so
+*.exports
 modules.link

Propchange: trunk/cel/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Apr  2 13:57:58 2010
@@ -7,4 +7,5 @@
 *.moduleinfo
 *.s
 *.so
+*.exports
 modules.link

Propchange: trunk/channels/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Apr  2 13:57:58 2010
@@ -9,4 +9,5 @@
 *.oo
 *.s
 *.so
+*.exports
 modules.link

Propchange: trunk/codecs/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Apr  2 13:57:58 2010
@@ -7,4 +7,5 @@
 *.moduleinfo
 *.s
 *.so
+*.exports
 modules.link

Propchange: trunk/formats/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Apr  2 13:57:58 2010
@@ -7,4 +7,5 @@
 *.moduleinfo
 *.s
 *.so
+*.exports
 modules.link

Propchange: trunk/funcs/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Apr  2 13:57:58 2010
@@ -7,4 +7,5 @@
 *.moduleinfo
 *.s
 *.so
+*.exports
 modules.link

Propchange: trunk/main/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Apr  2 13:57:58 2010
@@ -1,5 +1,6 @@
 *.i
 *.s
+*.d
+*.exports
 asterisk
-*.d
 version.c

Modified: trunk/main/Makefile
URL: http://svnview.digium.com/svn/asterisk/trunk/main/Makefile?view=diff&rev=255906&r1=255905&r2=255906
==============================================================================
--- trunk/main/Makefile (original)
+++ trunk/main/Makefile Fri Apr  2 13:57:58 2010
@@ -167,7 +167,7 @@
 
 $(OBJS): _ASTCFLAGS+=-DAST_MODULE=\"core\"
 
-$(MAIN_TGT): $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) asterisk.exports
+$(MAIN_TGT): $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS)
 	@$(CC) -c -o buildinfo.o $(_ASTCFLAGS) buildinfo.c $(ASTCFLAGS)
 	$(ECHO_PREFIX) echo "   [LD] $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) -> $@"
 ifneq ($(findstring chan_h323,$(MENUSELECT_CHANNELS)),)
@@ -176,9 +176,16 @@
 	$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(_ASTLDFLAGS) $(ASTLDFLAGS) $(H323LDFLAGS) $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(H323LDLIBS) $(GMIMELDFLAGS)
 endif
 
+ifeq ($(GNU_LD),1)
+$(MAIN_TGT): asterisk.exports
+asterisk.exports: asterisk.exports.in
+	$(CMD_PREFIX) $(ASTTOPDIR)/build_tools/make_linker_version_script asterisk $(LINKER_SYMBOL_PREFIX)
+endif
+
 clean::
 	rm -f asterisk
 	rm -f db1-ast/.*.d
+	rm -f asterisk.exports
 	@if [ -f editline/Makefile ]; then $(MAKE) -C editline distclean ; fi
 	@$(MAKE) -C db1-ast clean
 	@$(MAKE) -C stdtime clean

Propchange: trunk/pbx/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Apr  2 13:57:58 2010
@@ -7,4 +7,5 @@
 *.moduleinfo
 *.s
 *.so
+*.exports
 modules.link

Propchange: trunk/res/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Apr  2 13:57:58 2010
@@ -7,4 +7,5 @@
 *.moduleinfo
 *.s
 *.so
+*.exports
 modules.link

Propchange: trunk/tests/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Apr  2 13:57:58 2010
@@ -7,4 +7,5 @@
 *.moduleinfo
 *.s
 *.so
+*.exports
 modules.link

Propchange: trunk/utils/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Apr  2 13:57:58 2010
@@ -1,6 +1,7 @@
 *.d
 *.i
 *.s
+*.exports
 aelbison.c
 aelparse
 aelparse.c




More information about the svn-commits mailing list