Fix PLT issues
authorMatthias Clasen <matthiasc@src.gnome.org>
Sat, 30 Sep 2006 14:06:45 +0000 (14:06 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sat, 30 Sep 2006 14:06:45 +0000 (14:06 +0000)
13 files changed:
ChangeLog
glib/Makefile.am
glib/abicheck.sh
glib/gdataset.c
glib/glib.symbols
glib/gmarkup.c
glib/gnulib/g-gnulib.h
glib/gshell.c
glib/gslice.c
glib/gspawn-win32.c
glib/gspawn.c
glib/gutf8.c
glib/pltcheck.sh [new file with mode: 0755]

index 2da6471..4dd6fe1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-09-30  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/pltcheck.sh: A script to check PLT entries.
+       * glib/Makefile.am (TESTS): Run pltcheck.sh
+
+       * glib/*: Fix includes to correct some issues with
+       PLT entries.  (#354522, Behdad Esfahbod)
+
 2006-09-17  Hans Breuer  <hans@breuer.org>
 
        * glib/makefile.msc.in gobject/makefile.msc.in : better filtering
index 8cb352b..bcb1c01 100644 (file)
@@ -24,7 +24,7 @@ galiasdef.c: glib.symbols
 
 if OS_LINUX
 if HAVE_GNUC_VISIBILITY
-TESTS = abicheck.sh
+TESTS = abicheck.sh pltcheck.sh
 endif
 endif
 
index c814ba1..3e69685 100755 (executable)
@@ -6,8 +6,8 @@ INCLUDES="-include ${top_builddir:-..}/config.h"
 INCLUDES="$INCLUDES -include glibconfig.cpp"
 
 cpp -P -DINCLUDE_INTERNAL_SYMBOLS -DINCLUDE_VARIABLES -DG_STDIO_NO_WRAP_ON_UNIX -DALL_FILES $INCLUDES "${srcdir:-.}/glib.symbols" | sed -e '/^$/d' -e 's/ G_GNUC.*$//' -e 's/ PRIVATE$//' | sort > expected-abi
-rm glibconfig.cpp
+rm -f glibconfig.cpp
 
 nm -D -g --defined-only .libs/libglib-2.0.so | cut -d ' ' -f 3 | sort > actual-abi
 
-diff -u expected-abi actual-abi && rm expected-abi actual-abi
+diff -u expected-abi actual-abi && rm -f expected-abi actual-abi
index 914ffcf..10ce3dd 100644 (file)
@@ -35,8 +35,8 @@
 #include <string.h>
 
 #include "glib.h"
-#include "galias.h"
 #include "gdatasetprivate.h"
+#include "galias.h"
 
 
 /* --- defines --- */
index 1411e6f..fb44157 100644 (file)
@@ -1105,6 +1105,7 @@ g_string_down
 g_string_up
 #endif
 #ifdef INCLUDE_INTERNAL_SYMBOLS
+ /* these are not internal, but we don't want to alias them */
 g_string_append_c
 #endif
 g_str_equal
index 53fa57e..37bc884 100644 (file)
@@ -27,9 +27,8 @@
 #include <errno.h>
 
 #include "glib.h"
-#include "galias.h"
-
 #include "glibintl.h"
+#include "galias.h"
 
 GQuark
 g_markup_error_quark (void)
index ce5dab7..bb3b0c0 100644 (file)
@@ -21,6 +21,7 @@
 #include <config.h>
 #include <stdlib.h>
 #include "glib/glib.h"
+#include "glib/galias.h"
 
 /* Private namespace for gnulib functions */
 #define asnprintf        _g_gnulib_asnprintf
index 01ea43a..3bb434e 100644 (file)
 #include <string.h>
 
 #include "glib.h"
-#include "galias.h"
 
 #ifdef _
 #warning "FIXME remove gettext hack"
 #endif
 
 #include "glibintl.h"
+#include "galias.h"
 
 GQuark
 g_shell_error_quark (void)
index 5cb12d3..148827a 100644 (file)
@@ -32,8 +32,8 @@
 #include <errno.h>
 #include "gmem.h"               /* gslice.h */
 #include "gthreadprivate.h"
-#include "galias.h"
 #include "glib.h"
+#include "galias.h"
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>             /* sysconf() */
 #endif
index de72441..f5bc820 100644 (file)
@@ -46,6 +46,7 @@
 
 #include "glib.h"
 #include "gprintfint.h"
+#include "glibintl.h"
 #include "galias.h"
 
 #include <string.h>
@@ -67,8 +68,6 @@ int _wspawnve (int, const wchar_t *, const wchar_t **, const wchar_t **);
 int _wspawnv (int, const wchar_t *, const wchar_t **);
 #endif
 
-#include "glibintl.h"
-
 #ifdef G_SPAWN_WIN32_DEBUG
   static int debug = 1;
   #define SETUP_DEBUG() /* empty */
index 9550ada..5939732 100644 (file)
@@ -36,9 +36,8 @@
 #endif /* HAVE_SYS_SELECT_H */
 
 #include "glib.h"
-#include "galias.h"
-
 #include "glibintl.h"
+#include "galias.h"
 
 static gint g_execute (const gchar  *file,
                        gchar **argv,
index 84d3552..f9b719d 100644 (file)
@@ -28,7 +28,6 @@
 #include <string.h>
 
 #include "glib.h"
-#include "galias.h"
 
 #ifdef G_PLATFORM_WIN32
 #include <stdio.h>
@@ -40,6 +39,7 @@
 #include "libcharset/libcharset.h"
 
 #include "glibintl.h"
+#include "galias.h"
 
 #define UTF8_COMPUTE(Char, Mask, Len)                                        \
   if (Char < 128)                                                            \
diff --git a/glib/pltcheck.sh b/glib/pltcheck.sh
new file mode 100755 (executable)
index 0000000..b2a04b7
--- /dev/null
@@ -0,0 +1,19 @@
+#!/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
+       # g_string_insert_c is used in g_string_append_c_inline
+       # unaliased.  Couldn't find a way to fix it.
+       readelf -r $so | grep 'JU\?MP_SLOT' | grep -v '\<g_string_insert_c\>' | grep '\<g_' && status=1
+done
+
+exit $status