summaryrefslogtreecommitdiffstats
path: root/rpc/xdr/src/Makefile.am
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2018-01-05 10:22:45 -0500
committerAmar Tumballi <amarts@redhat.com>2018-01-12 06:53:13 +0000
commitcf37aa990797e520945491134e1e5af4e2107711 (patch)
tree0ee1aa39c98b6d1543bcf648755c65e11b7a6288 /rpc/xdr/src/Makefile.am
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 <kkeithle@redhat.com>
Diffstat (limited to 'rpc/xdr/src/Makefile.am')
-rw-r--r--rpc/xdr/src/Makefile.am5
1 files changed, 3 insertions, 2 deletions
diff --git a/rpc/xdr/src/Makefile.am b/rpc/xdr/src/Makefile.am
index abf8ada9777..45816b977d5 100644
--- a/rpc/xdr/src/Makefile.am
+++ b/rpc/xdr/src/Makefile.am
@@ -4,7 +4,7 @@ XDRGENFILES = glusterfs3-xdr.x glusterfs4-xdr.x cli1-xdr.x nlm4-xdr.x nsm-xdr.x
XDRHEADERS = $(XDRGENFILES:.x=.h)
XDRSOURCES = $(XDRGENFILES:.x=.c)
-EXTRA_DIST = $(XDRGENFILES)
+EXTRA_DIST = $(XDRGENFILES) libgfxdr.sym
lib_LTLIBRARIES = libgfxdr.la
@@ -16,7 +16,8 @@ libgfxdr_la_CPPFLAGS = $(GF_CPPFLAGS) -D__USE_FILE_OFFSET64 \
libgfxdr_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
-libgfxdr_la_LDFLAGS = -version-info $(LIBGFXDR_LT_VERSION)
+libgfxdr_la_LDFLAGS = -version-info $(LIBGFXDR_LT_VERSION) \
+ -export-symbols $(top_srcdir)/rpc/xdr/src/libgfxdr.sym
libgfxdr_la_SOURCES = xdr-generic.c xdr-nfs3.c msg-nfs3.c
nodist_libgfxdr_la_SOURCES = $(XDRSOURCES)