Fix some issues with PLT entries.
authorMatthias Clasen <matthiasc@src.gnome.org>
Sat, 30 Sep 2006 13:59:01 +0000 (13:59 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sat, 30 Sep 2006 13:59:01 +0000 (13:59 +0000)
gobject/ChangeLog
gobject/Makefile.am
gobject/gobject.c
gobject/gsignal.c
gobject/gtype.c
gobject/gvaluetypes.c
gobject/pltcheck.sh [new file with mode: 0755]

index f2f268aa334d4e558653d28d2bb31a446a03d58a..2811830731aaa2cb9e90a95023f1c0362d1261fa 100644 (file)
@@ -1,3 +1,15 @@
+Sat Sep 30 2006  Matthias Clasen  <mclasen@redhat.com>
+
+       * pltcheck.sh: Script to check PLT entries.
+
+       * Makefile.am (TESTS): Run pltcheck.sh
+
+       * gtype.c:
+       * gsignal.c:
+       * gobject.c:
+       * gvaluetypes.c: Move all includes before gobjectalias.h.
+       (#3545422, Behdad Esfahbod)
+
 Fri Sep 22 13:41:02 2006  Tim Janik  <timj@imendio.com>
 
        * gtype.h: applied patch from Behdad with slight optimization, 
index 09d732b41b39485f4f72a216765f171ca8610fa5..f192ee09f31021d4800686b58d4c3329b66d6cbe 100644 (file)
@@ -154,6 +154,12 @@ EXTRA_DIST = \
 gen_sources = xgen-gmh xgen-gmc xgen-gms
 CLEANFILES = $(gen_sources)
 
+if OS_LINUX
+if HAVE_GNUC_VISIBILITY
+TESTS = pltcheck.sh
+endif
+endif
+
 # normal autogeneration rules
 # all autogenerated files need to be generated in the srcdir,
 # so old versions get remade and are not confused with newer
index d5290a108aa9a8774c9701b67da39f3c98305d9d..7514c9a3d2b4180b70d56d29b063da4424dc51e6 100644 (file)
@@ -17,7 +17,6 @@
  * Boston, MA 02111-1307, USA.
  */
 #include       "gobject.h"
-#include       "gobjectalias.h"
 #include        <glib/gdatasetprivate.h>
 
 /*
 #include       "gsignal.h"
 #include       "gparamspecs.h"
 #include       "gvaluetypes.h"
-#include       "gobjectnotifyqueue.c"
 #include       <string.h>
 #include       <signal.h>
 
+#include       "gobjectalias.h"
+
+/* This should be included after gobjectalias.h (or pltcheck.sh will fail) */
+#include       "gobjectnotifyqueue.c"
+
 
 #define        PREALLOC_CPARAMS        (8)
 
index 8bd147849bcad5e87be1f56019dd599c76f917ad..c65565ae2bd4c75cf893cc2d026d05dec2045577 100644 (file)
@@ -32,6 +32,8 @@
 #include        "gvaluecollector.h"
 #include       "gvaluetypes.h"
 #include       "gboxed.h"
+#include       "gobject.h"
+#include       "genums.h"
 
 #include       "gobjectalias.h"
 
@@ -2605,8 +2607,6 @@ g_signal_accumulator_true_handled (GSignalInvocationHint *ihint,
 }
 
 /* --- compile standard marshallers --- */
-#include       "gobject.h"
-#include       "genums.h"
 #include        "gmarshal.c"
 
 #define __G_SIGNAL_C__
index 04bcc7e10ccd22386c0d890eb4f510ba27f2633b..12ce66fe80aa7d779a26ba4457641b3447bf668c 100644 (file)
@@ -18,7 +18,6 @@
  */
 #include        <config.h>
 #include       "gtype.h"
-#include       "gobjectalias.h"
 
 /*
  * MT safe
@@ -29,6 +28,7 @@
 #include       "gbsearcharray.h"
 #include       <string.h>
 
+#include       "gobjectalias.h"
 
 /* NOTE: some functions (some internal variants and exported ones)
  * invalidate data portions of the TypeNodes. if external functions/callbacks
index 7bfc9f6c9b81d0e9e1aa080bb24734418b717818..a479a5807e3aca446cfe24d71c50efab822c8f3d 100644 (file)
 #include       "gvaluetypes.h"
 
 #include       "gvaluecollector.h"
+
+#include "gobject.h"
+#include "gparam.h"
+#include "gboxed.h"
+#include "genums.h"
+
 #include       "gobjectalias.h"
 #include       <string.h>
 #include       <stdlib.h>      /* qsort() */
@@ -847,12 +853,6 @@ g_value_get_gtype (const GValue *value)
 }
 
 
-/* need extra includes for g_strdup_value_contents() ;( */
-#include "gobject.h"
-#include "gparam.h"
-#include "gboxed.h"
-#include "genums.h"
-
 gchar*
 g_strdup_value_contents (const GValue *value)
 {
diff --git a/gobject/pltcheck.sh b/gobject/pltcheck.sh
new file mode 100755 (executable)
index 0000000..19edfac
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+LANG=C
+
+status=0
+
+if ! which readelf 2>/dev/null >/dev/null; then
+       echo "'readelf' not found; skipping test"
+       exit 0
+fi
+
+for so in .libs/lib*.so; do
+       echo Checking $so for local PLT entries
+       readelf -r $so | grep 'JU\?MP_SLOT' | grep '\<g_type_\|\<g_boxed_\|\<g_value_\|\<g_cclosure_\|\<g_closure_\|\<g_signal\|\<g_enum_\|\<g_flags_\|\<g_io_\|\<g_object_\|\<g_param_' && status=1
+done
+
+exit $status