From 7c2c1dfcfcbc6ede86e6aefab19b5fcdee180e95 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Thu, 24 Oct 2019 00:23:56 +0200 Subject: [PATCH] libbtrfsutil: add list of exported symbols for version 1.1.1 The library exports should have the symbols versioned to allow future extensions. The earlier versions are skipped and current version is the first one, no change for existing applications as the same set of functions is exported. Signed-off-by: David Sterba --- Makefile | 5 +++-- libbtrfsutil.sym | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 libbtrfsutil.sym diff --git a/Makefile b/Makefile index 0cd7f0c1..1c824b4d 100644 --- a/Makefile +++ b/Makefile @@ -475,10 +475,11 @@ libbtrfsutil/%.o: libbtrfsutil/%.c @echo " [CC] $@" $(Q)$(CC) $(LIBBTRFSUTIL_CFLAGS) -o $@ -c $< -o $@ -libbtrfsutil.so.$(libbtrfsutil_version): $(libbtrfsutil_objects) +libbtrfsutil.so.$(libbtrfsutil_version): $(libbtrfsutil_objects) libbtrfsutil.sym @echo " [LD] $@" $(Q)$(CC) $(LIBBTRFSUTIL_CFLAGS) $(libbtrfsutil_objects) $(LIBBTRFSUTIL_LDFLAGS) \ - -shared -Wl,-soname,libbtrfsutil.so.$(libbtrfsutil_major) -o $@ + -shared -Wl,-soname,libbtrfsutil.so.$(libbtrfsutil_major) \ + -Wl,--version-script=libbtrfsutil.sym -o $@ libbtrfsutil.a: $(libbtrfsutil_objects) @echo " [AR] $@" diff --git a/libbtrfsutil.sym b/libbtrfsutil.sym new file mode 100644 index 00000000..e6ece9e2 --- /dev/null +++ b/libbtrfsutil.sym @@ -0,0 +1,47 @@ +LIBBTRFSUTIL_1.1 { +global: + btrfs_util_create_qgroup_inherit; + btrfs_util_create_snapshot; + btrfs_util_create_snapshot_fd; + btrfs_util_create_snapshot_fd2; + btrfs_util_create_subvolume; + btrfs_util_create_subvolume_fd; + btrfs_util_create_subvolume_iterator; + btrfs_util_create_subvolume_iterator_fd; + btrfs_util_deleted_subvolumes; + btrfs_util_deleted_subvolumes_fd; + btrfs_util_delete_subvolume; + btrfs_util_delete_subvolume_fd; + btrfs_util_destroy_qgroup_inherit; + btrfs_util_destroy_subvolume_iterator; + btrfs_util_get_default_subvolume; + btrfs_util_get_default_subvolume_fd; + btrfs_util_get_subvolume_read_only; + btrfs_util_get_subvolume_read_only_fd; + btrfs_util_is_subvolume; + btrfs_util_is_subvolume_fd; + btrfs_util_qgroup_inherit_add_group; + btrfs_util_qgroup_inherit_get_groups; + btrfs_util_set_default_subvolume; + btrfs_util_set_default_subvolume_fd; + btrfs_util_set_subvolume_read_only; + btrfs_util_set_subvolume_read_only_fd; + btrfs_util_start_sync; + btrfs_util_start_sync_fd; + btrfs_util_strerror; + btrfs_util_subvolume_id; + btrfs_util_subvolume_id_fd; + btrfs_util_subvolume_info; + btrfs_util_subvolume_info_fd; + btrfs_util_subvolume_iterator_fd; + btrfs_util_subvolume_iterator_next; + btrfs_util_subvolume_iterator_next_info; + btrfs_util_subvolume_path; + btrfs_util_subvolume_path_fd; + btrfs_util_sync; + btrfs_util_sync_fd; + btrfs_util_wait_sync; + btrfs_util_wait_sync_fd; +local: + *; +};