Files
mold/test/version-script23.sh
Rui Ueyama 14a276ecde Set pipefail to test rigorously
We need to stop using `grep -q` because grep terminates immediately after
finding the first match with `-q`, causing SIGPIPE to the process on the
other side of the pipe.
2025-02-09 07:33:54 +09:00

16 lines
307 B
Bash
Executable File

#!/bin/bash
. $(dirname $0)/common.inc
cat <<'EOF' > $t/a.ver
VER1 { foo\?; };
EOF
cat <<EOF | $CC -c -o $t/b.o -xassembler - >& /dev/null || skip
.globl "foo?"
"foo?":
EOF
$CC -B. -shared -Wl,--version-script=$t/a.ver -o $t/c.so $t/b.o
readelf -W --dyn-syms $t/c.so > $t/log
grep -F 'foo?@@VER1' $t/log