• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env bash
2#
3# Hack to check for leaking symbols in the static library.
4# See https://bugs.freedesktop.org/show_bug.cgi?id=82785
5# Note the spaces in the expressions! After the first grep, each line
6# is " T symbol_name"
7
8test -z "$RUNNING_ON_VALGRIND" || exit 77
9
10builddir="$1"
11
12test -f "$builddir/test-static-link" || (echo "Unable to find test file" && exit 1)
13nm --extern-only "$builddir/test-static-link" |
14	grep -o -e " T .*" | \
15	grep -v -e " main\$" \
16		-e " atexit" \
17		-e " mangle_path" \
18		-e " *gcov.*" \
19		-e " _.*" \
20		-e " libevdev_*" && \
21		echo "Leaking symbols found" && exit 1 || exit 0
22