summaryrefslogtreecommitdiffstats
path: root/xlators/features/glupy
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2015-07-31 14:11:15 -0400
committerNiels de Vos <ndevos@redhat.com>2015-09-24 07:37:42 -0700
commit1d82db506d1cd5b20d14820d89033de2e4a14210 (patch)
treeb4bc67f988b054d5e738884a91ce18c48244161a /xlators/features/glupy
parent84367f0c9106f5a604ac05a02898d4521fa5c832 (diff)
build: export minimum symbols from xlators for correct resolution
We've been lucky that we haven't had any symbol collisions until now. Now we have a collision between the snapview-client's svc_lookup() and libntirpc's svc_lookup() with nfs-ganesha's FSAL_GLUSTER and libgfapi. As a short term solution all the snapview-client's FOP methods were changed to static scope. See http://review.gluster.org/11805. This works in snapview-client because all the FOP methods are defined in a single source file. This solution doesn't work for other xlators with FOP methods defined in multiple source files. To address this we link with libtool's '-export-symbols $symbol-file' (a wrapper around `ld --version-script ...` --- on linux anyway) and only export the minimum required symbols from the xlator sharedlib. N.B. the libtool man page says that the symbol file should be named foo.sym, thus the rename of *.exports to *.sym. While foo.exports worked, we will follow the documentation. Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> BUG: 1248669 Change-Id: I1de68b3e3be58ae690d8bfb2168bfc019983627c Reviewed-on: http://review.gluster.org/11814 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: soumya k <skoduri@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'xlators/features/glupy')
-rw-r--r--xlators/features/glupy/src/Makefile.am4
-rw-r--r--xlators/features/glupy/src/glupy.sym101
2 files changed, 104 insertions, 1 deletions
diff --git a/xlators/features/glupy/src/Makefile.am b/xlators/features/glupy/src/Makefile.am
index 2ac0d99cd5f..eadccf75c15 100644
--- a/xlators/features/glupy/src/Makefile.am
+++ b/xlators/features/glupy/src/Makefile.am
@@ -7,7 +7,7 @@ AM_CPPFLAGS = $(PYTHONDEV_CPPFLAGS) $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/
AM_CFLAGS = $(PYTHONDEV_CFLAGS) -Wall -fno-strict-aliasing -DGLUSTER_PYTHON_PATH=\"$(glupydir)\" -DPATH_GLUSTERFS_GLUPY_MODULE=\"${xlatordir}/glupy${shrext_cmds}\" $(GF_CFLAGS)
# Flags to build glupy.so with
-glupy_la_LDFLAGS = $(PYTHONDEV_LDFLAGS) -module -avoid-version -nostartfiles
+glupy_la_LDFLAGS = $(PYTHONDEV_LDFLAGS) -module -avoid-version -nostartfiles -export-symbols $(top_srcdir)/xlators/features/glupy/src/glupy.sym
glupy_la_SOURCES = glupy.c
glupy_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
-lpthread -l$(BUILD_PYTHON_LIB)
@@ -22,3 +22,5 @@ pyglupy_PYTHON = __init__.py
SUBDIRS = glupy
CLEANFILES =
+
+EXTRA_DIST = glupy.sym
diff --git a/xlators/features/glupy/src/glupy.sym b/xlators/features/glupy/src/glupy.sym
new file mode 100644
index 00000000000..55d9a300108
--- /dev/null
+++ b/xlators/features/glupy/src/glupy.sym
@@ -0,0 +1,101 @@
+init
+fini
+fops
+cbks
+options
+notify
+mem_acct_init
+reconfigure
+dumpops
+set_lookup_fop
+set_lookup_cbk
+set_create_fop
+set_create_cbk
+set_open_fop
+set_open_cbk
+set_readv_fop
+set_readv_cbk
+set_writev_fop
+set_writev_cbk
+set_opendir_fop
+set_opendir_cbk
+set_readdir_fop
+set_readdir_cbk
+set_readdirp_fop
+set_readdirp_cbk
+set_stat_fop
+set_stat_cbk
+set_fstat_fop
+set_fstat_cbk
+set_statfs_fop
+set_statfs_cbk
+set_setxattr_fop
+set_setxattr_cbk
+set_getxattr_fop
+set_getxattr_cbk
+set_fsetxattr_fop
+set_fsetxattr_cbk
+set_fgetxattr_fop
+set_fgetxattr_cbk
+set_removexattr_fop
+set_removexattr_cbk
+set_fremovexattr_fop
+set_fremovexattr_cbk
+set_link_fop
+set_link_cbk
+set_symlink_fop
+set_symlink_cbk
+set_readlink_fop
+set_readlink_cbk
+set_unlink_fop
+set_unlink_cbk
+set_mkdir_fop
+set_mkdir_cbk
+set_rmdir_fop
+set_rmdir_cbk
+wind_lookup
+wind_create
+wind_open
+wind_readv
+wind_writev
+wind_opendir
+wind_readdir
+wind_readdirp
+wind_stat
+wind_fstat
+wind_statfs
+wind_setxattr
+wind_getxattr
+wind_fsetxattr
+wind_fgetxattr
+wind_removexattr
+wind_fremovexattr
+wind_link
+wind_symlink
+wind_readlink
+wind_unlink
+wind_mkdir
+wind_rmdir
+unwind_lookup
+unwind_create
+unwind_open
+unwind_readv
+unwind_writev
+unwind_opendir
+unwind_readdir
+unwind_readdirp
+unwind_stat
+unwind_fstat
+unwind_statfs
+unwind_setxattr
+unwind_getxattr
+unwind_fsetxattr
+unwind_fgetxattr
+unwind_removexattr
+unwind_fremovexattr
+unwind_link
+unwind_symlink
+unwind_readlink
+unwind_unlink
+unwind_mkdir
+unwind_rmdir