Add hidden aliases for exported symbols which are used internally in order
Tue Aug 10 23:53:59 2004 Matthias Clasen <maclas@gmx.de> Add hidden aliases for exported symbols which are used internally in order to get rid of many PLT entries. (#145519, Arjan van de Ven) * gdk/Makefile.am: Add rules to generate gdk_pixbuf.def and gdk-pixbuf-alias.h from gdk-pixbuf.symbols, and make make check check the abi with abicheck.sh. * gdk/gdk-pixbuf.symbols: New file. Definition of the gdk-pixbuf ABI. The file can be processed by cpp to filter out certain subsets of symbols. * gdk/abicheck.sh: New file. Script to check the actually symbols exported from libgdk_pibuf.2.0.so against the symbols found in gdk-pixbuf.symbols. * gdk/makegdkpixbufalias.pl: New file. Perl script to generate the header containing the alias definitions for internally used exported symbols from a list of symbols. * *.c: Include gdk-pixbuf-alias.h
This commit is contained in:
committed by
Matthias Clasen
parent
4a465af574
commit
f4437de139
56
gdk-pixbuf/makegdkpixbufalias.pl
Executable file
56
gdk-pixbuf/makegdkpixbufalias.pl
Executable file
@ -0,0 +1,56 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
print <<EOF;
|
||||
/* Generated by makegdkpixbufalias.pl */
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#ifdef G_HAVE_GNUC_VISIBILITY
|
||||
|
||||
#ifdef GDK_PIXBUF_DISABLE_DEPRECATED
|
||||
#define WAS_NO_DEPR
|
||||
#endif
|
||||
#undef GDK_PIXBUF_DISABLE_DEPRECATED
|
||||
|
||||
#ifdef G_DISABLE_DEPRECATED
|
||||
#define WAS_NO_G_DEPR
|
||||
#endif
|
||||
#undef G_DISABLE_DEPRECATED
|
||||
|
||||
#include "gdk-pixbuf.h"
|
||||
#include "gdk-pixdata.h"
|
||||
#include "gdk-pixbuf-marshal.h"
|
||||
|
||||
EOF
|
||||
|
||||
while (<>) {
|
||||
|
||||
# ignore empty lines
|
||||
next if /^\s*$/;
|
||||
|
||||
my $str = $_;
|
||||
chomp($str);
|
||||
my $alias = $str."__internal_alias";
|
||||
|
||||
print "extern __typeof ($str) $alias __attribute((visibility(\"hidden\"))); \n";
|
||||
print "extern __typeof ($str) $str __attribute((alias(\"$alias\"), visibility(\"default\"))); \n";
|
||||
print "#define $str $alias \n";
|
||||
print "\n";
|
||||
}
|
||||
|
||||
print <<EOF;
|
||||
|
||||
#ifdef WAS_NO_DEPR
|
||||
#define GDK_PIXBUF_DISABLE_DEPRECATED
|
||||
#undef WAS_NO_DEPR
|
||||
#endif
|
||||
|
||||
#ifdef WAS_NO_G_DEPR
|
||||
#define G_DISABLE_DEPRECATED
|
||||
#undef WAS_NO_G_DEPR
|
||||
#endif
|
||||
|
||||
#endif /* G_HAVE_GNUC_VISIBILITY */
|
||||
EOF
|
||||
|
||||
|
||||
Reference in New Issue
Block a user