When reviewing helg@'s last diff I noticed a bunch of stuff that
shouldn't be exported.  So here's a diff similar to the recent
diffs for libutil and libkvm.  To get the list of public symbols I used
symbol visibility.

The diff below only reduces the symbols list, it does not remove PLT
entries for internal calls, as I don't feel confident using this
machinery.  AFAIK this can be done in a subsequent step with no bump.

check_sym output:
/usr/lib/libfuse.so.1.1 --> obj/libfuse.so.2.0
Dynamic export changes:
removed:
        __bss_start
        __data_start
        _edata
        _end
        _fini
        _init
        alloc_vn
        build_realname
        dict_SPLAY
        dict_SPLAY_INSERT
        dict_SPLAY_MINMAX
        dict_SPLAY_REMOVE
        dict_check
        dict_get
        dict_pop
        dict_set
        get_vn_by_name_and_parent
        ifuse_debug
        ifuse_debug_init
        ifuse_exec_opcode
        ref_vn
        remove_vnode_from_name_tree
        set_vn
        tree_SPLAY
        tree_SPLAY_INSERT
        tree_SPLAY_MINMAX
        tree_SPLAY_REMOVE
        tree_check
        tree_get
        tree_pop
        tree_set
        unref_vn

PLT removed:
        alloc_vn
        build_realname
        dict_SPLAY
        dict_check
        dict_get
        dict_pop
        dict_set
        get_vn_by_name_and_parent
        ifuse_debug_init
        ifuse_exec_opcode
        ref_vn
        set_vn
        tree_SPLAY
        tree_get
        tree_pop
        tree_set
        unref_vn

To be committed in the next lib bump.

Thoughts?  ok?


Index: Makefile
===================================================================
--- Makefile.orig
+++ Makefile
@@ -17,6 +17,8 @@ CFLAGS+=      -I${.CURDIR}
 SRCS=  debug.c dict.c fuse.c fuse_ops.c fuse_opt.c fuse_subr.c tree.c
 HDRS=  fuse.h fuse_opt.h
 
+VERSION_SCRIPT=        ${.CURDIR}/Symbols.map
+
 PC_FILES=fuse.pc
 CLEANFILES+=${PC_FILES}
 
Index: Symbols.map
===================================================================
--- /dev/null
+++ Symbols.map
@@ -0,0 +1,31 @@
+{
+       global:
+               fuse_chan_fd;
+               fuse_daemonize;
+               fuse_destroy;
+               fuse_get_context;
+               fuse_get_session;
+               fuse_invalidate;
+               fuse_is_lib_option;
+               fuse_loop;
+               fuse_loop_mt;
+               fuse_main;
+               fuse_mount;
+               fuse_new;
+               fuse_opt_add_arg;
+               fuse_opt_add_opt;
+               fuse_opt_add_opt_escaped;
+               fuse_opt_free_args;
+               fuse_opt_insert_arg;
+               fuse_opt_match;
+               fuse_opt_parse;
+               fuse_parse_cmdline;
+               fuse_remove_signal_handlers;
+               fuse_set_signal_handlers;
+               fuse_setup;
+               fuse_teardown;
+               fuse_unmount;
+               fuse_version;
+       local:
+               *;
+};
Index: shlib_version
===================================================================
--- shlib_version.orig
+++ shlib_version
@@ -1,2 +1,2 @@
-major=1
-minor=1
+major=2
+minor=0


-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to