Simplify linker script

Version linker scripts support function names and globs, so there's no
need to rely on nm tool to gather the exported symbols.
This commit is contained in:
Lucas De Marchi 2010-09-21 09:46:31 -03:00 committed by Marcel Holtmann
parent 64b0af24bd
commit e57df97584
4 changed files with 8 additions and 16 deletions

2
.gitignore vendored
View File

@ -27,8 +27,6 @@ include/ofono
include/version.h
src/builtin.h
src/ofonod
src/ofono.exp
src/ofono.ver
unit/test-common
unit/test-util

View File

@ -300,8 +300,7 @@ src_ofonod_LDFLAGS = -Wl,--export-dynamic -Wl,--version-script=src/ofono.ver
src_ofonod_DEPENDENCIES = src/ofono.ver
CLEANFILES = src/ofono.ver src/ofono.exp src/builtin.h \
$(local_headers) $(rules_DATA)
CLEANFILES = src/builtin.h $(local_headers) $(rules_DATA)
plugindir = $(libdir)/ofono/plugins
@ -458,15 +457,6 @@ src/plugin.$(OBJEXT): src/builtin.h
src/builtin.h: src/genbuiltin $(builtin_sources)
$(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_modules) > $@
src/ofono.exp: $(src_ofonod_OBJECTS)
$(AM_V_GEN)$(NM) $^ | $(AWK) '{ print $$3 }' | sort -u | \
$(EGREP) -e '^ofono_' -e '^g_dbus_' > $@
src/ofono.ver: src/ofono.exp
$(AM_V_at)echo "{ global:" > $@
$(AM_V_GEN)$(SED) -e "s/\(.*\)/\1;/" $< >> $@
$(AM_V_at)echo "local: *; };" >> $@
plugins/%.rules:
$(AM_V_GEN)cp $(srcdir)/$(subst 97-,,$@) $@

View File

@ -22,8 +22,6 @@ AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_CC_PIE
AC_PROG_INSTALL
AC_PROG_SED
AC_PROG_AWK
AM_PROG_MKDIR_P
m4_define([_LT_AC_TAGCONFIG], [])
@ -31,7 +29,6 @@ m4_ifdef([AC_LIBTOOL_TAGS], [AC_LIBTOOL_TAGS([])])
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
AC_PROG_NM
AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization],
[disable code optimization through compiler]), [

7
src/ofono.ver Normal file
View File

@ -0,0 +1,7 @@
{
global:
ofono_*;
g_dbus_*;
local:
*;
};