Debian Codegraph @

test/retain-symbols-file.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2 . $(dirnamescip-shell system . . dirname. $0)/common.inc
3
4 catscip-shell system . . cat. <<EOF | $CC -c -o $t/a.o -xc -
5 static void foo() {}
6 void bar() {}
7 void baz() {}
8 int main() { foo(); }
9 EOF
10
11 catscip-shell system . . cat. <<EOF > $t/symbols
12 foo
13 baz
14 EOF
15
16 $CC -B. -o $t/exe $t/a.o -Wl,--retain-symbols-file=$t/symbols
17 readelfscip-shell system . . readelf. -W --symbols $t/exe > $t/log
18
19 not grep ' foo$' $t/log
20 not grep ' bar$' $t/log
21 not grep ' main$' $t/log
22
23 grepscip-shell system . . grep. ' baz$' $t/log