1
1
mirror of https://github.com/rui314/mold.git synced 2024-10-04 16:48:04 +03:00
mold/test/elf/linker-script3.sh
Yang Liu 0d2a258e77 Fix missing parameter in linker script tests
Signed-off-by: Yang Liu <liuyang22@iscas.ac.cn>
2022-09-02 16:12:44 +08:00

28 lines
461 B
Bash
Executable File

#!/bin/bash
export LC_ALL=C
set -e
CC="${TEST_CC:-cc}"
CXX="${TEST_CXX:-c++}"
GCC="${TEST_GCC:-gcc}"
GXX="${TEST_GXX:-g++}"
OBJDUMP="${OBJDUMP:-objdump}"
MACHINE="${MACHINE:-$(uname -m)}"
testname=$(basename "$0" .sh)
echo -n "Testing $testname ... "
t=out/test/elf/$MACHINE/$testname
mkdir -p $t
mkdir -p $t/foo
cat <<EOF | $CC -o $t/foo/a.o -c -xc -
int main() {}
EOF
cat <<EOF > $t/b.script
INPUT(a.o)
EOF
$CC -B. -o $t/exe -L$t/foo $t/b.script
echo OK