diff options
author | Kevin P. Fleming <kpfleming@digium.com> | 2010-04-02 18:57:58 +0000 |
---|---|---|
committer | Kevin P. Fleming <kpfleming@digium.com> | 2010-04-02 18:57:58 +0000 |
commit | 2be88e05c043e8abc1b6a3c94c4699859a7adf68 (patch) | |
tree | 617eb61593a42ffe9e08c245fa183358073bbf84 /main | |
parent | f4617ae2b534262484980b4fbff2e42f87543b23 (diff) |
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.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@255906 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r-- | main/Makefile | 9 | ||||
-rw-r--r-- | main/asterisk.exports | 45 | ||||
-rw-r--r-- | main/asterisk.exports.in | 45 |
3 files changed, 53 insertions, 46 deletions
diff --git a/main/Makefile b/main/Makefile index a019a0855..ada40fe61 100644 --- a/main/Makefile +++ b/main/Makefile @@ -167,7 +167,7 @@ endif $(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 @@ else $(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 diff --git a/main/asterisk.exports b/main/asterisk.exports deleted file mode 100644 index 284bf36f2..000000000 --- a/main/asterisk.exports +++ /dev/null @@ -1,45 +0,0 @@ -{ - global: - ast_*; - _ast_*; - __ast_*; - pbx_*; - astman_*; - ao2_*; - __ao2_*; - option_debug; - option_verbose; - dahdi_chan_name; - dahdi_chan_name_len; - dahdi_chan_mode; - callerid_*; - cid_di; - cid_dr; - clidsb; - MD5*; - sched_*; - io_*; - jb_*; - aes_*; - config_*; - tdd_*; - term_*; - channelreloadreason2txt; - devstate2str; - __manager_event; - dialed_interface_info; - strsep; - setenv; - unsetenv; - strcasestr; - strnlen; - strndup; - vasprintf; - asprintf; - strtoq; - getloadavg; - ntohll; - htonll; - local: - *; -}; diff --git a/main/asterisk.exports.in b/main/asterisk.exports.in new file mode 100644 index 000000000..ef1dcddc2 --- /dev/null +++ b/main/asterisk.exports.in @@ -0,0 +1,45 @@ +{ + global: + LINKER_SYMBOL_PREFIXast_*; + LINKER_SYMBOL_PREFIX_ast_*; + LINKER_SYMBOL_PREFIX__ast_*; + LINKER_SYMBOL_PREFIXpbx_*; + LINKER_SYMBOL_PREFIXastman_*; + LINKER_SYMBOL_PREFIXao2_*; + LINKER_SYMBOL_PREFIX__ao2_*; + LINKER_SYMBOL_PREFIXoption_debug; + LINKER_SYMBOL_PREFIXoption_verbose; + LINKER_SYMBOL_PREFIXdahdi_chan_name; + LINKER_SYMBOL_PREFIXdahdi_chan_name_len; + LINKER_SYMBOL_PREFIXdahdi_chan_mode; + LINKER_SYMBOL_PREFIXcallerid_*; + LINKER_SYMBOL_PREFIXcid_di; + LINKER_SYMBOL_PREFIXcid_dr; + LINKER_SYMBOL_PREFIXclidsb; + LINKER_SYMBOL_PREFIXMD5*; + LINKER_SYMBOL_PREFIXsched_*; + LINKER_SYMBOL_PREFIXio_*; + LINKER_SYMBOL_PREFIXjb_*; + LINKER_SYMBOL_PREFIXaes_*; + LINKER_SYMBOL_PREFIXconfig_*; + LINKER_SYMBOL_PREFIXtdd_*; + LINKER_SYMBOL_PREFIXterm_*; + LINKER_SYMBOL_PREFIXchannelreloadreason2txt; + LINKER_SYMBOL_PREFIXdevstate2str; + LINKER_SYMBOL_PREFIX__manager_event; + LINKER_SYMBOL_PREFIXdialed_interface_info; + LINKER_SYMBOL_PREFIXstrsep; + LINKER_SYMBOL_PREFIXsetenv; + LINKER_SYMBOL_PREFIXunsetenv; + LINKER_SYMBOL_PREFIXstrcasestr; + LINKER_SYMBOL_PREFIXstrnlen; + LINKER_SYMBOL_PREFIXstrndup; + LINKER_SYMBOL_PREFIXvasprintf; + LINKER_SYMBOL_PREFIXasprintf; + LINKER_SYMBOL_PREFIXstrtoq; + LINKER_SYMBOL_PREFIXgetloadavg; + LINKER_SYMBOL_PREFIXntohll; + LINKER_SYMBOL_PREFIXhtonll; + local: + *; +}; |