* [PATCH] Simplify linker script
@ 2010-09-21 18:46 Lucas De Marchi
2010-09-21 20:14 ` Johan Hedberg
0 siblings, 1 reply; 5+ messages in thread
From: Lucas De Marchi @ 2010-09-21 18:46 UTC (permalink / raw)
To: linux-bluetooth; +Cc: barbieri, Lucas De Marchi
Version linker scripts support function names and globs, so there's no
need to rely on nm tool to gather the exported symbols.
---
.gitignore | 1 -
Makefile.am | 14 +-------------
configure.ac | 2 +-
src/bluetooth.ver.in | 10 ++++++++++
4 files changed, 12 insertions(+), 15 deletions(-)
create mode 100644 src/bluetooth.ver.in
diff --git a/.gitignore b/.gitignore
index e12508e..db6c3f3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -34,7 +34,6 @@ bluez.pc
lib/bluetooth
src/builtin.h
src/bluetoothd
-src/bluetooth.exp
src/bluetooth.ver
audio/telephony.c
scripts/bluetooth.rules
diff --git a/Makefile.am b/Makefile.am
index 05bc8fc..1c70e5d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -258,7 +258,7 @@ builtin_files = src/builtin.h $(builtin_nodist)
nodist_src_bluetoothd_SOURCES = $(builtin_files)
-CLEANFILES += src/bluetooth.ver src/bluetooth.exp $(builtin_files)
+CLEANFILES += $(builtin_files)
man_MANS = src/bluetoothd.8
@@ -392,18 +392,6 @@ src/plugin.$(OBJEXT): src/builtin.h
src/builtin.h: src/genbuiltin $(builtin_sources)
$(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_modules) > $@
-src/bluetooth.exp: $(src_bluetoothd_OBJECTS)
- $(AM_V_GEN)$(NM) $^ | $(AWK) '{ print $$3 }' | sort -u | \
- $(EGREP) -e '^btd_' -e '^g_dbus_' > $@
- $(AM_V_at)echo -e "info" >> $@
- $(AM_V_at)echo -e "error" >> $@
- $(AM_V_at)echo -e "debug" >> $@
-
-src/bluetooth.ver: src/bluetooth.exp
- $(AM_V_at)echo "{ global:" > $@
- $(AM_V_GEN)$(SED) -e "s/\(.*\)/\1;/" $< >> $@
- $(AM_V_at)echo "local: *; };" >> $@
-
audio/telephony.c: audio/@TELEPHONY_DRIVER@
$(AM_V_GEN)$(LN_S) $(abs_top_srcdir)/$< $@
diff --git a/configure.ac b/configure.ac
index 6fda7fe..08f4877 100644
--- a/configure.ac
+++ b/configure.ac
@@ -65,5 +65,5 @@ if (test "${enable_netlink}" = "yes"); then
fi
AM_CONDITIONAL(NETLINK, test "${enable_netlink}" = "yes")
-AC_OUTPUT(Makefile scripts/bluetooth.rules doc/version.xml
+AC_OUTPUT(Makefile scripts/bluetooth.rules doc/version.xml src/bluetooth.ver
src/bluetoothd.8 bluez.pc)
diff --git a/src/bluetooth.ver.in b/src/bluetooth.ver.in
new file mode 100644
index 0000000..b71c70d
--- /dev/null
+++ b/src/bluetooth.ver.in
@@ -0,0 +1,10 @@
+{
+ global:
+ btd_*;
+ g_dbus_*;
+ info;
+ error;
+ debug;
+ local:
+ *;
+};
--
1.7.2.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Simplify linker script
2010-09-21 18:46 [PATCH] Simplify linker script Lucas De Marchi
@ 2010-09-21 20:14 ` Johan Hedberg
2010-09-21 20:41 ` Lucas De Marchi
0 siblings, 1 reply; 5+ messages in thread
From: Johan Hedberg @ 2010-09-21 20:14 UTC (permalink / raw)
To: Lucas De Marchi; +Cc: linux-bluetooth, barbieri
Hi Lucas,
On Tue, Sep 21, 2010, Lucas De Marchi wrote:
> Version linker scripts support function names and globs, so there's no
> need to rely on nm tool to gather the exported symbols.
> ---
> .gitignore | 1 -
> Makefile.am | 14 +-------------
> configure.ac | 2 +-
> src/bluetooth.ver.in | 10 ++++++++++
> 4 files changed, 12 insertions(+), 15 deletions(-)
> create mode 100644 src/bluetooth.ver.in
Thanks for the patch. It has been pushed to the upstream tree. Could you
provide one for obexd too?
Johan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Simplify linker script
2010-09-21 20:14 ` Johan Hedberg
@ 2010-09-21 20:41 ` Lucas De Marchi
0 siblings, 0 replies; 5+ messages in thread
From: Lucas De Marchi @ 2010-09-21 20:41 UTC (permalink / raw)
To: Lucas De Marchi, linux-bluetooth, barbieri
On Tue, Sep 21, 2010 at 5:14 PM, Johan Hedberg <johan.hedberg@gmail.com> wrote:
> Thanks for the patch. It has been pushed to the upstream tree. Could you
> provide one for obexd too?
It seems that obexd does not have a linker script like connman, ofono
and bluez. Which functions should I export in that case?
Regards
Lucas De Marchi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Simplify linker script
2010-09-21 12:46 Lucas De Marchi
@ 2010-09-21 14:26 ` Marcel Holtmann
0 siblings, 0 replies; 5+ messages in thread
From: Marcel Holtmann @ 2010-09-21 14:26 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 432 bytes --]
Hi Lucas,
> Version linker scripts support function names and globs, so there's no
> need to rely on nm tool to gather the exported symbols.
> ---
> .gitignore | 2 --
> Makefile.am | 12 +-----------
> configure.ac | 3 ---
> src/ofono.ver | 7 +++++++
> 4 files changed, 8 insertions(+), 16 deletions(-)
> create mode 100644 src/ofono.ver
patch has been applied. Thanks.
Regards
Marcel
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] Simplify linker script
@ 2010-09-21 12:46 Lucas De Marchi
2010-09-21 14:26 ` Marcel Holtmann
0 siblings, 1 reply; 5+ messages in thread
From: Lucas De Marchi @ 2010-09-21 12:46 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 2364 bytes --]
Version linker scripts support function names and globs, so there's no
need to rely on nm tool to gather the exported symbols.
---
.gitignore | 2 --
Makefile.am | 12 +-----------
configure.ac | 3 ---
src/ofono.ver | 7 +++++++
4 files changed, 8 insertions(+), 16 deletions(-)
create mode 100644 src/ofono.ver
diff --git a/.gitignore b/.gitignore
index 1ce7067..472522b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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
diff --git a/Makefile.am b/Makefile.am
index eda0250..702e308 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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-,,$@) $@
diff --git a/configure.ac b/configure.ac
index 401a959..fb78a8e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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]), [
diff --git a/src/ofono.ver b/src/ofono.ver
new file mode 100644
index 0000000..3dce6f3
--- /dev/null
+++ b/src/ofono.ver
@@ -0,0 +1,7 @@
+{
+ global:
+ ofono_*;
+ g_dbus_*;
+ local:
+ *;
+};
--
1.7.2.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-09-21 20:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-21 18:46 [PATCH] Simplify linker script Lucas De Marchi
2010-09-21 20:14 ` Johan Hedberg
2010-09-21 20:41 ` Lucas De Marchi
-- strict thread matches above, loose matches on Subject: below --
2010-09-21 12:46 Lucas De Marchi
2010-09-21 14:26 ` Marcel Holtmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.