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.
14 lines
284 B
Bash
Executable File
14 lines
284 B
Bash
Executable File
#!/bin/bash
|
|
. $(dirname $0)/common.inc
|
|
|
|
cat <<'EOF' > $t/a.ver
|
|
{ local: *; global: extern "C++" { *foo*; }; };
|
|
EOF
|
|
|
|
cat <<EOF | $CC -fPIC -c -o $t/b.o -xc -
|
|
void foobar() {}
|
|
EOF
|
|
|
|
$CC -B. -shared -Wl,--version-script=$t/a.ver -o $t/c.so $t/b.o
|
|
readelf --dyn-syms $t/c.so | grep foobar
|