On 06 Jul 2015, at 18:16, Max
<max.suraev(a)fairwaves.co> wrote:
Dear Max,
gb_gprs_bssgp_test_SOURCES = gb/gprs_bssgp_test.c
gb_gprs_bssgp_test_LDADD = $(top_builddir)/src/libosmocore.la
$(top_builddir)/src/gb/libosmogb.la $(LIBRARY_DL)
+gb_gprs_bssgp_test_LDFLAGS = -static -Wl,--wrap=gprs_ns_sendmsg
we still run into this issue when building for Ubuntu and the answer is that they pass
-Bsymbolic-functions and this means that the internal calls to gprs_ns_sendmsg are linked
directly so we can not interpose.
Your change forces static linking so the gprs_ns_sendmsg is resolved differently and
allows us to interpose one way or another. The issue with -static is that we now have an
optional static build.
I am tempted to just put LDFLAGS := $(LDFLAGS:-Wl,-Bsymbolic-functions=) into the
debian/rules. The library will not perform worse than on other platforms.
The other architectural change is to be able to "plug" transport so we can
provide our own send functions.