mirror of
https://github.com/rui314/mold.git
synced 2026-10-28 16:45:11 +08:00
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.
16 lines
307 B
Bash
Executable File
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
|