changeset 483:7546e1e31105

Export only a minimum of symbols. This should fix PR472.
author Thomas Meyer <thomas@m3y3r.de>
date Tue, 07 Aug 2012 23:11:28 +0200
parents d7f2593595d9
children 1d033579d40e
files ChangeLog Makefile.am plugin/icedteanp/IcedTeaNPPlugin.cc
diffstat 3 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Aug 07 23:06:03 2012 +0200
+++ b/ChangeLog	Tue Aug 07 23:11:28 2012 +0200
@@ -1,3 +1,8 @@
+2012-08-07  Thomas Meyer  <thomas@m3y3r.de>
+
+	* plugin/icedteanp/IcedTeaNPPlugin.cc: only export NP_GetMIMEDescription,
+	NP_GetValue, NP_Initialize and NP_Shutdown. This should fix PR472.
+
 2012-08-07  Saad Mohammad  <smohammad@redhat.com>
 
 	Added license header to files without one.
--- a/Makefile.am	Tue Aug 07 23:06:03 2012 +0200
+++ b/Makefile.am	Tue Aug 07 23:11:28 2012 +0200
@@ -270,6 +270,7 @@
 	  $(GLIB_CFLAGS) \
 	  $(GTK_CFLAGS) \
 	  $(MOZILLA_CFLAGS) \
+  	  -fvisibility=hidden \
 	  -fPIC -o $@ -c $<
 
 $(PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY): $(addprefix $(PLUGIN_DIR)/,$(PLUGIN_OBJECTS))
@@ -278,7 +279,7 @@
 	  $(PLUGIN_OBJECTS) \
 	  $(GLIB_LIBS) \
 	  $(GTK_LIBS) \
-	  $(MOZILLA_LIBS)\
+	  $(MOZILLA_LIBS) \
 	  -shared -o $@
 
 clean-IcedTeaPlugin:
--- a/plugin/icedteanp/IcedTeaNPPlugin.cc	Tue Aug 07 23:06:03 2012 +0200
+++ b/plugin/icedteanp/IcedTeaNPPlugin.cc	Tue Aug 07 23:11:28 2012 +0200
@@ -2112,6 +2112,7 @@
 // this function, then it is evident that NP_Initialize has already
 // been called. There is no need to call this function more than once and
 // this workaround avoids any duplicate calls.
+__attribute__ ((visibility ("default")))
 NPError
 NP_Initialize (NPNetscapeFuncs* browserTable, NPPluginFuncs* pluginTable)
 {
@@ -2314,6 +2315,7 @@
 
 // Returns a string describing the MIME type that this plugin
 // handles.
+__attribute__ ((visibility ("default")))
 #ifdef LEGACY_XULRUNNERAPI
   char* 
 #else
@@ -2330,6 +2332,7 @@
 
 // Returns a value relevant to the plugin as a whole.  The browser
 // calls this function to obtain information about the plugin.
+__attribute__ ((visibility ("default")))
 NPError
 NP_GetValue (void* future, NPPVariable variable, void* value)
 {
@@ -2363,6 +2366,7 @@
 
 // Shuts down the plugin.  Called after the last plugin instance is
 // destroyed.
+__attribute__ ((visibility ("default")))
 NPError
 NP_Shutdown (void)
 {