+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
if OS_LINUX
if HAVE_GNUC_VISIBILITY
-TESTS = abicheck.sh
+TESTS = abicheck.sh pltcheck.sh
endif
endif
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
#include <string.h>
#include "glib.h"
-#include "galias.h"
#include "gdatasetprivate.h"
+#include "galias.h"
/* --- defines --- */
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
#include <errno.h>
#include "glib.h"
-#include "galias.h"
-
#include "glibintl.h"
+#include "galias.h"
GQuark
g_markup_error_quark (void)
#include <config.h>
#include <stdlib.h>
#include "glib/glib.h"
+#include "glib/galias.h"
/* Private namespace for gnulib functions */
#define asnprintf _g_gnulib_asnprintf
#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)
#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
#include "glib.h"
#include "gprintfint.h"
+#include "glibintl.h"
#include "galias.h"
#include <string.h>
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 */
#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,
#include <string.h>
#include "glib.h"
-#include "galias.h"
#ifdef G_PLATFORM_WIN32
#include <stdio.h>
#include "libcharset/libcharset.h"
#include "glibintl.h"
+#include "galias.h"
#define UTF8_COMPUTE(Char, Mask, Len) \
if (Char < 128) \
--- /dev/null
+#!/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