[HQ](Debian) Package version up
[external/glib2.0.git] / glib / pltcheck.sh
1 #!/bin/sh
2
3 LANG=C
4
5 status=0
6
7 if ! which readelf 2>/dev/null >/dev/null; then
8         echo "'readelf' not found; skipping test"
9         exit 0
10 fi
11
12 for so in .libs/lib*.so; do
13         echo Checking $so for local PLT entries
14         # g_string_insert_c is used in g_string_append_c_inline
15         # unaliased.  Couldn't find a way to fix it.
16         # Same for g_once_init_enter
17         readelf -r $so | grep 'JU\?MP_SLOT\?' | \
18                 grep -v '\<g_string_insert_c\>' | \
19                 grep -v '\<g_atomic_[a-z]*_[sg]et\>' | \
20                 grep -v '\<g_once_init_enter_impl\>' | \
21                 grep -v '\<g_bit_' | \
22                 grep '\<g_' && status=1
23 done
24
25 exit $status