All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] [PATCH] Fix libsensors symbol visibility
@ 2011-02-17 10:49 Jean Delvare
  2011-02-17 16:33 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Jean Delvare @ 2011-02-17 10:49 UTC (permalink / raw)
  To: lm-sensors

From: Cristian Rodriguez <crrodriguez@opensuse.org>

Only export from libsensors symbols which are actually public (i.e.
listed in the public header files and documented in the manual page.)
---
It worked fine on the 3 distributions I tested it on (openSUSE 11.3,
Slackware 12.0 and 9.1, Debian) but I would welcome tests on more
distributions (including old ones) just to make sure it doesn't break
anything.

 lib/Module.mk      |    2 +-
 lib/libsensors.map |   23 +++++++++++++++++++++++
 2 files changed, 24 insertions(+), 1 deletion(-)

--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ lm-sensors/lib/libsensors.map	2011-02-17 10:08:27.000000000 +0100
@@ -0,0 +1,23 @@
+{
+global:
+  libsensors_version;
+  sensors_cleanup;
+  sensors_do_chip_sets;
+  sensors_free_chip_name;
+  sensors_get_adapter_name;
+  sensors_get_all_subfeatures;
+  sensors_get_detected_chips;
+  sensors_get_features;
+  sensors_get_label;
+  sensors_get_subfeature;
+  sensors_get_value;
+  sensors_init;
+  sensors_parse_chip_name;
+  sensors_set_value;
+  sensors_snprintf_chip_name;
+  sensors_strerror;
+  sensors_parse_error;
+  sensors_parse_error_wfn;
+  sensors_fatal_error;
+local: *;
+ };
--- lm-sensors.orig/lib/Module.mk	2011-02-17 10:07:59.000000000 +0100
+++ lm-sensors/lib/Module.mk	2011-02-17 10:08:04.000000000 +0100
@@ -63,7 +63,7 @@ LIBHEADERFILES := $(MODULE_DIR)/error.h
 
 # How to create the shared library
 $(MODULE_DIR)/$(LIBSHLIBNAME): $(LIBSHOBJECTS)
-	$(CC) -shared $(LDFLAGS) -Wl,-soname,$(LIBSHSONAME) -o $@ $^ -lc -lm
+	$(CC) -shared $(LDFLAGS) -Wl,--version-script=$(LIB_DIR)/libsensors.map -Wl,-soname,$(LIBSHSONAME) -o $@ $^ -lc -lm
 
 $(MODULE_DIR)/$(LIBSHSONAME): $(MODULE_DIR)/$(LIBSHLIBNAME)
 	$(RM) $@


-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [lm-sensors] [PATCH] Fix libsensors symbol visibility
  2011-02-17 10:49 [lm-sensors] [PATCH] Fix libsensors symbol visibility Jean Delvare
@ 2011-02-17 16:33 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2011-02-17 16:33 UTC (permalink / raw)
  To: lm-sensors

On Thu, Feb 17, 2011 at 05:49:31AM -0500, Jean Delvare wrote:
> From: Cristian Rodriguez <crrodriguez@opensuse.org>
> 
> Only export from libsensors symbols which are actually public (i.e.
> listed in the public header files and documented in the manual page.)
> ---
> It worked fine on the 3 distributions I tested it on (openSUSE 11.3,
> Slackware 12.0 and 9.1, Debian) but I would welcome tests on more
> distributions (including old ones) just to make sure it doesn't break
> anything.

Works for me in Ubuntu 10.4 and 10.10.

Guenter

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-17 16:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-17 10:49 [lm-sensors] [PATCH] Fix libsensors symbol visibility Jean Delvare
2011-02-17 16:33 ` Guenter Roeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.