[PATCH libevdev 1/2] Add ld version-script
Peter Hutterer
peter.hutterer at who-t.net
Tue Jan 7 17:32:10 PST 2014
From: David Herrmann <dh.herrmann at gmail.com>
Explicit symbol versioning allows us to provide multiple versions of
incompatible API changes. It is a very common practice in GNU world and
avoids the problems occuring if distributions try to ship multiple version
of a single DSO.
Background information available at:
http://people.redhat.com/drepper/dsohowto.pdf
To see the symbol-versions, use objdump:
objdump -T libevdev/.libs/libevdev.so.1.0.0
This can also be used to verify that all symbols are correctly
exported (typos in linker-scripts are silently ignored by ld).
Signed-off-by: David Herrmann <dh.herrmann at gmail.com>
Updated for evdev 0.6's API.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
libevdev/Makefile.am | 8 ++--
libevdev/libevdev.sym | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 109 insertions(+), 3 deletions(-)
create mode 100644 libevdev/libevdev.sym
diff --git a/libevdev/Makefile.am b/libevdev/Makefile.am
index 739ed7d..5ff8799 100644
--- a/libevdev/Makefile.am
+++ b/libevdev/Makefile.am
@@ -15,8 +15,10 @@ libevdev_la_SOURCES = \
libevdev_la_LDFLAGS = \
-version-info $(LIBEVDEV_LT_VERSION) \
- -export-symbols-regex '^libevdev_|^LIBEVDEV_' \
- $(GNU_LD_FLAGS)
+ -Wl,--version-script="$(srcdir)/libevdev.sym" \
+ $(GCOV_LDFLAGS)
+
+EXTRA_libevdev_la_DEPENDENCIES = $(srcdir)/libevdev.sym
libevdevincludedir = $(includedir)/libevdev-1.0/libevdev
libevdevinclude_HEADERS = libevdev.h libevdev-uinput.h
@@ -24,7 +26,7 @@ libevdevinclude_HEADERS = libevdev.h libevdev-uinput.h
event-names.h: Makefile make-event-names.py
$(PYTHON) $(srcdir)/make-event-names.py --output=c $(top_srcdir)/include/linux/input.h > $@
-EXTRA_DIST = make-event-names.py
+EXTRA_DIST = make-event-names.py libevdev.sym
CLEANFILES = event-names.h
BUILT_SOURCES = event-names.h
diff --git a/libevdev/libevdev.sym b/libevdev/libevdev.sym
new file mode 100644
index 0000000..ef4f06b
--- /dev/null
+++ b/libevdev/libevdev.sym
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2013 David Herrmann <dh.herrmann at gmail.com>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no representations
+ * about the suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+LIBEVDEV_1 {
+global:
+ libevdev_change_fd;
+ libevdev_disable_event_code;
+ libevdev_disable_event_type;
+ libevdev_enable_event_code;
+ libevdev_enable_event_type;
+ libevdev_enable_property;
+ libevdev_event_code_from_name;
+ libevdev_event_code_from_name_n;
+ libevdev_event_code_get_name;
+ libevdev_event_is_code;
+ libevdev_event_is_type;
+ libevdev_event_type_from_name;
+ libevdev_event_type_from_name_n;
+ libevdev_event_type_get_max;
+ libevdev_event_type_get_name;
+ libevdev_fetch_event_value;
+ libevdev_fetch_slot_value;
+ libevdev_free;
+ libevdev_get_abs_flat;
+ libevdev_get_abs_fuzz;
+ libevdev_get_abs_info;
+ libevdev_get_abs_maximum;
+ libevdev_get_abs_minimum;
+ libevdev_get_abs_resolution;
+ libevdev_get_current_slot;
+ libevdev_get_driver_version;
+ libevdev_get_event_value;
+ libevdev_get_fd;
+ libevdev_get_id_bustype;
+ libevdev_get_id_product;
+ libevdev_get_id_vendor;
+ libevdev_get_id_version;
+ libevdev_get_log_priority;
+ libevdev_get_name;
+ libevdev_get_num_slots;
+ libevdev_get_phys;
+ libevdev_get_repeat;
+ libevdev_get_slot_value;
+ libevdev_get_uniq;
+ libevdev_grab;
+ libevdev_has_event_code;
+ libevdev_has_event_pending;
+ libevdev_has_event_type;
+ libevdev_has_property;
+ libevdev_kernel_set_abs_info;
+ libevdev_kernel_set_led_value;
+ libevdev_kernel_set_led_values;
+ libevdev_new;
+ libevdev_new_from_fd;
+ libevdev_next_event;
+ libevdev_property_get_name;
+ libevdev_set_abs_flat;
+ libevdev_set_abs_fuzz;
+ libevdev_set_abs_info;
+ libevdev_set_abs_maximum;
+ libevdev_set_abs_minimum;
+ libevdev_set_abs_resolution;
+ libevdev_set_clock_id;
+ libevdev_set_event_value;
+ libevdev_set_fd;
+ libevdev_set_id_bustype;
+ libevdev_set_id_product;
+ libevdev_set_id_vendor;
+ libevdev_set_id_version;
+ libevdev_set_log_function;
+ libevdev_set_log_priority;
+ libevdev_set_name;
+ libevdev_set_phys;
+ libevdev_set_slot_value;
+ libevdev_set_uniq;
+ libevdev_uinput_create_from_device;
+ libevdev_uinput_destroy;
+ libevdev_uinput_get_devnode;
+ libevdev_uinput_get_fd;
+ libevdev_uinput_get_syspath;
+ libevdev_uinput_write_event;
+
+local:
+ *;
+};
--
1.8.4.2
More information about the Input-tools
mailing list