path: root/rpc/rpc-lib/src/
diff options
authorKaleb S. KEITHLEY <>2018-01-05 10:22:45 -0500
committerAmar Tumballi <>2018-01-12 06:53:13 +0000
commitcf37aa990797e520945491134e1e5af4e2107711 (patch)
tree0ee1aa39c98b6d1543bcf648755c65e11b7a6288 /rpc/rpc-lib/src/
parentb8a319db3dc37e452a27c5fb2efd7668ff81743c (diff)
rpc: use export map to minimize exported symbols in libgf{rpc,xdr}.so
Without an export map (at link time) libgrpc and libgfxdr export over 150 and 450 symbols each, respectively. Many are not used by anything else. (Unclear what the unused symbols are, some may be simple sloppiness, e.g. not declaring functions static that should be. Others may be intra-library calls that can't be static but aren't part of the API, per se.) By linking with an export map the number of exported symbols is reduced to ~60 and ~250 respectively. This parallels the similar change made to libglusterfs recently and the older changes to the xlators to minimize the symbols that are visible (exported) from the .so. And I don't know, do we want to go all the way to symbol versions? For these libs? And for libglusterfs? fixes gluster/glusterfs#392 Change-Id: I9cdc3eee10e5f1408d7e7f2f29fad597c97e4003 Signed-off-by: Kaleb S. KEITHLEY <>
Diffstat (limited to 'rpc/rpc-lib/src/')
1 files changed, 4 insertions, 1 deletions
diff --git a/rpc/rpc-lib/src/ b/rpc/rpc-lib/src/
index c07d001..95ce812 100644
--- a/rpc/rpc-lib/src/
+++ b/rpc/rpc-lib/src/
@@ -4,9 +4,12 @@ libgfrpc_la_SOURCES = auth-unix.c rpcsvc-auth.c rpcsvc.c auth-null.c \
rpc-transport.c xdr-rpc.c xdr-rpcclnt.c rpc-clnt.c auth-glusterfs.c \
rpc-drc.c $(CONTRIBDIR)/sunrpc/xdr_sizeof.c rpc-clnt-ping.c
+EXTRA_DIST = libgfrpc.sym
libgfrpc_la_LIBADD = $(top_builddir)/libglusterfs/src/ \
-libgfrpc_la_LDFLAGS = -version-info $(LIBGFRPC_LT_VERSION) $(GF_LDFLAGS)
+libgfrpc_la_LDFLAGS = -version-info $(LIBGFRPC_LT_VERSION) $(GF_LDFLAGS) \
+ -export-symbols $(top_srcdir)/rpc/rpc-lib/src/libgfrpc.sym
libgfrpc_la_HEADERS = rpcsvc.h rpc-transport.h xdr-common.h xdr-rpc.h xdr-rpcclnt.h \
rpc-clnt.h rpcsvc-common.h protocol-common.h rpc-drc.h rpc-clnt-ping.h \