diff options
author | Kaleb S. KEITHLEY <kkeithle@redhat.com> | 2018-01-05 10:22:45 -0500 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-01-12 06:53:13 +0000 |
commit | cf37aa990797e520945491134e1e5af4e2107711 (patch) | |
tree | 0ee1aa39c98b6d1543bcf648755c65e11b7a6288 | |
parent | b8a319db3dc37e452a27c5fb2efd7668ff81743c (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>
-rw-r--r-- | rpc/rpc-lib/src/Makefile.am | 5 | ||||
-rw-r--r-- | rpc/rpc-lib/src/libgfrpc.sym | 65 | ||||
-rw-r--r-- | rpc/xdr/src/Makefile.am | 5 | ||||
-rw-r--r-- | rpc/xdr/src/libgfxdr.sym | 246 |
4 files changed, 318 insertions, 3 deletions
diff --git a/rpc/rpc-lib/src/Makefile.am b/rpc/rpc-lib/src/Makefile.am index c07d001b057..95ce812fe7b 100644 --- a/rpc/rpc-lib/src/Makefile.am +++ b/rpc/rpc-lib/src/Makefile.am @@ -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/libglusterfs.la \ $(top_builddir)/rpc/xdr/src/libgfxdr.la -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 \ diff --git a/rpc/rpc-lib/src/libgfrpc.sym b/rpc/rpc-lib/src/libgfrpc.sym new file mode 100644 index 00000000000..37484e435ad --- /dev/null +++ b/rpc/rpc-lib/src/libgfrpc.sym @@ -0,0 +1,65 @@ +is_rpc_clnt_disconnected +rpcclnt_cbk_program_register +rpc_clnt_cleanup_and_start +rpc_clnt_connection_cleanup +rpc_clnt_disable +rpc_clnt_disconnect +rpc_clnt_new +rpc_clnt_reconfig +rpc_clnt_reconnect +rpc_clnt_reconnect_cleanup +rpc_clnt_ref +rpc_clnt_register_notify +rpc_clnt_set_connected +rpc_clnt_start +rpc_clnt_submit +rpc_clnt_unref +rpc_clnt_unset_connected +rpc_reply_to_xdr +rpcsvc_auth_array +rpcsvc_auth_check +rpcsvc_auth_reconf +rpcsvc_auth_unix_auxgids +rpcsvc_callback_submit +rpcsvc_create_listener +rpcsvc_create_listeners +rpcsvc_drc_init +rpcsvc_drc_priv +rpcsvc_drc_reconfigure +rpcsvc_get_program_vector_sizer +rpcsvc_init +rpcsvc_init_options +rpcsvc_listener_destroy +rpcsvc_program_register +rpcsvc_program_register_portmap +rpcsvc_program_unregister +rpcsvc_program_unregister_portmap +rpcsvc_reconfigure_options +rpcsvc_register_notify +rpcsvc_register_portmap_enabled +rpcsvc_request_submit +rpcsvc_set_outstanding_rpc_limit +rpcsvc_set_throttle_on +rpcsvc_submit_generic +rpcsvc_submit_message +rpcsvc_transport_peeraddr +rpcsvc_transport_peername +rpcsvc_transport_privport_check +rpcsvc_transport_unix_options_build +rpcsvc_transport_volume_allowed +rpcsvc_transport_connect +rpcsvc_transport_getpeeraddr +rpcsvc_unregister_notify +rpcsvc_volume_allowed +rpc_transport_count +rpc_transport_connect +rpc_transport_disconnect +rpc_transport_get_peeraddr +rpc_transport_inet_options_build +rpc_transport_keepalive_options_set +rpc_transport_notify +rpc_transport_pollin_alloc +rpc_transport_pollin_destroy +rpc_transport_ref +rpc_transport_unix_options_build +rpc_transport_unref 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) diff --git a/rpc/xdr/src/libgfxdr.sym b/rpc/xdr/src/libgfxdr.sym new file mode 100644 index 00000000000..8af956ef5a9 --- /dev/null +++ b/rpc/xdr/src/libgfxdr.sym @@ -0,0 +1,246 @@ +xdr_auth_glusterfs_parms +xdr_auth_glusterfs_parms_v2 +xdr_changelog_event_req +xdr_changelog_event_rsp +xdr_changelog_probe_req +xdr_changelog_probe_rsp +xdr_dirpath +xdr_free_exports_list +xdr_free_mountlist +xdr_gd1_mgmt_brick_op_req +xdr_gd1_mgmt_brick_op_rsp +xdr_gd1_mgmt_cluster_lock_req +xdr_gd1_mgmt_cluster_lock_rsp +xdr_gd1_mgmt_cluster_unlock_req +xdr_gd1_mgmt_cluster_unlock_rsp +xdr_gd1_mgmt_commit_op_req +xdr_gd1_mgmt_commit_op_rsp +xdr_gd1_mgmt_friend_req +xdr_gd1_mgmt_friend_rsp +xdr_gd1_mgmt_friend_update +xdr_gd1_mgmt_friend_update_rsp +xdr_gd1_mgmt_probe_req +xdr_gd1_mgmt_probe_rsp +xdr_gd1_mgmt_stage_op_req +xdr_gd1_mgmt_stage_op_rsp +xdr_gd1_mgmt_v3_brick_op_req +xdr_gd1_mgmt_v3_brick_op_rsp +xdr_gd1_mgmt_v3_commit_req +xdr_gd1_mgmt_v3_commit_rsp +xdr_gd1_mgmt_v3_lock_req +xdr_gd1_mgmt_v3_lock_rsp +xdr_gd1_mgmt_v3_post_val_req +xdr_gd1_mgmt_v3_post_val_rsp +xdr_gd1_mgmt_v3_pre_val_req +xdr_gd1_mgmt_v3_pre_val_rsp +xdr_gd1_mgmt_v3_unlock_req +xdr_gd1_mgmt_v3_unlock_rsp +xdr_gf1_cli_fsm_log_req +xdr_gf1_cli_fsm_log_rsp +xdr_gf1_cli_getwd_req +xdr_gf1_cli_getwd_rsp +xdr_gf1_cli_mount_req +xdr_gf1_cli_mount_rsp +xdr_gf1_cli_peer_list_req +xdr_gf1_cli_peer_list_rsp +xdr_gf1_cli_umount_req +xdr_gf1_cli_umount_rsp +xdr_gf_cli_req +xdr_gf_cli_rsp +xdr_gf_common_rsp +xdr_gf_dump_req +xdr_gf_dump_rsp +xdr_gf_event_notify_req +xdr_gf_event_notify_rsp +xdr_gf_getsnap_name_uuid_req +xdr_gf_getsnap_name_uuid_rsp +xdr_gf_getspec_req +xdr_gf_getspec_rsp +xdr_gf_get_volume_info_req +xdr_gf_get_volume_info_rsp +xdr_gf_mgmt_hndsk_req +xdr_gf_mgmt_hndsk_rsp +xdr_gfs3_access_req +xdr_gfs3_cbk_cache_invalidation_req +xdr_gfs3_compound_req +xdr_gfs3_compound_rsp +xdr_gfs3_create_req +xdr_gfs3_create_rsp +xdr_gfs3_discard_req +xdr_gfs3_discard_rsp +xdr_gfs3_entrylk_req +xdr_gfs3_fallocate_req +xdr_gfs3_fallocate_rsp +xdr_gfs3_fentrylk_req +xdr_gfs3_fgetxattr_req +xdr_gfs3_fgetxattr_rsp +xdr_gfs3_finodelk_req +xdr_gfs3_flush_req +xdr_gfs3_fremovexattr_req +xdr_gfs3_fsetattr_req +xdr_gfs3_fsetattr_req_v2 +xdr_gfs3_fsetattr_rsp +xdr_gfs3_fsetxattr_req +xdr_gfs3_fstat_req +xdr_gfs3_fstat_rsp +xdr_gfs3_fsyncdir_req +xdr_gfs3_fsync_req +xdr_gfs3_fsync_rsp +xdr_gfs3_ftruncate_req +xdr_gfs3_ftruncate_rsp +xdr_gfs3_fxattrop_req +xdr_gfs3_fxattrop_rsp +xdr_gfs3_getactivelk_req +xdr_gfs3_getactivelk_rsp +xdr_gfs3_getxattr_req +xdr_gfs3_getxattr_rsp +xdr_gfs3_inodelk_req +xdr_gfs3_ipc_req +xdr_gfs3_ipc_rsp +xdr_gfs3_lease_req +xdr_gfs3_lease_rsp +xdr_gfs3_link_req +xdr_gfs3_link_rsp +xdr_gfs3_lk_req +xdr_gfs3_lk_rsp +xdr_gfs3_lookup_req +xdr_gfs3_lookup_rsp +xdr_gfs3_mkdir_req +xdr_gfs3_mkdir_rsp +xdr_gfs3_mknod_req +xdr_gfs3_mknod_rsp +xdr_gfs3_opendir_req +xdr_gfs3_opendir_rsp +xdr_gfs3_open_req +xdr_gfs3_open_rsp +xdr_gfs3_rchecksum_req +xdr_gfs3_rchecksum_req_v2 +xdr_gfs3_rchecksum_rsp +xdr_gfs3_readdirp_req +xdr_gfs3_readdirp_rsp +xdr_gfs3_readdir_req +xdr_gfs3_readdir_rsp +xdr_gfs3_readlink_req +xdr_gfs3_readlink_rsp +xdr_gfs3_read_req +xdr_gfs3_read_rsp +xdr_gfs3_recall_lease_req +xdr_gfs3_releasedir_req +xdr_gfs3_release_req +xdr_gfs3_removexattr_req +xdr_gfs3_rename_req +xdr_gfs3_rename_rsp +xdr_gfs3_rmdir_req +xdr_gfs3_rmdir_rsp +xdr_gfs3_seek_req +xdr_gfs3_seek_rsp +xdr_gfs3_setactivelk_req +xdr_gfs3_setactivelk_rsp +xdr_gfs3_setattr_req +xdr_gfs3_setattr_rsp +xdr_gfs3_setxattr_req +xdr_gfs3_statfs_req +xdr_gfs3_statfs_rsp +xdr_gfs3_stat_req +xdr_gfs3_stat_rsp +xdr_gfs3_symlink_req +xdr_gfs3_symlink_rsp +xdr_gfs3_truncate_req +xdr_gfs3_truncate_rsp +xdr_gfs3_unlink_req +xdr_gfs3_unlink_rsp +xdr_gfs3_write_req +xdr_gfs3_write_rsp +xdr_gfs3_xattrop_req +xdr_gfs3_xattrop_rsp +xdr_gfs3_zerofill_req +xdr_gfs3_zerofill_rsp +xdr_gfs4_icreate_req +xdr_gfs4_icreate_rsp +xdr_gfs4_namelink_req +xdr_gfs4_namelink_rsp +xdr_gf_set_lk_ver_req +xdr_gf_set_lk_ver_rsp +xdr_gf_setvolume_req +xdr_gf_setvolume_rsp +xdr_gf_statedump +xdr_length_round_up +xdr_mon +xdr_mountres3 +xdr_mountstat3 +xdr_nlm_sm_status +xdr_pmap_brick_by_port_req +xdr_pmap_brick_by_port_rsp +xdr_pmap_port_by_brick_req +xdr_pmap_port_by_brick_rsp +xdr_pmap_signin_req +xdr_pmap_signin_rsp +xdr_pmap_signout_req +xdr_pmap_signout_rsp +xdr_serialize_access3res +xdr_serialize_commit3res +xdr_serialize_create3res +xdr_serialize_exports +xdr_serialize_fsinfo3res +xdr_serialize_fsstat3res +xdr_serialize_generic +xdr_serialize_getaclreply +xdr_serialize_getattr3res +xdr_serialize_link3res +xdr_serialize_lookup3res +xdr_serialize_mkdir3res +xdr_serialize_mknod3res +xdr_serialize_mountlist +xdr_serialize_mountres3 +xdr_serialize_mountstat3 +xdr_serialize_nlm4_res +xdr_serialize_nlm4_shareres +xdr_serialize_nlm4_testargs +xdr_serialize_nlm4_testres +xdr_serialize_pathconf3res +xdr_serialize_read3res +xdr_serialize_read3res_nocopy +xdr_serialize_readdir3res +xdr_serialize_readdirp3res +xdr_serialize_readlink3res +xdr_serialize_remove3res +xdr_serialize_rename3res +xdr_serialize_rmdir3res +xdr_serialize_setaclreply +xdr_serialize_setattr3res +xdr_serialize_symlink3res +xdr_serialize_write3res +xdr_sm_stat +xdr_sm_stat_res +xdr_to_access3args +xdr_to_commit3args +xdr_to_create3args +xdr_to_fsinfo3args +xdr_to_fsstat3args +xdr_to_generic +xdr_to_getaclargs +xdr_to_getattr3args +xdr_to_link3args +xdr_to_lookup3args +xdr_to_mkdir3args +xdr_to_mknod3args +xdr_to_mountpath +xdr_to_nlm4_cancelargs +xdr_to_nlm4_freeallargs +xdr_to_nlm4_lockargs +xdr_to_nlm4_shareargs +xdr_to_nlm4_testargs +xdr_to_nlm4_unlockargs +xdr_to_pathconf3args +xdr_to_read3args +xdr_to_readdir3args +xdr_to_readdirp3args +xdr_to_readlink3args +xdr_to_remove3args +xdr_to_rename3args +xdr_to_rmdir3args +xdr_to_setaclargs +xdr_to_setattr3args +xdr_to_symlink3args +xdr_to_write3args +xdr_vector_round_up |