diff --git a/test/elf/relocatable-compressed-debug-info.sh b/test/elf/relocatable-compressed-debug-info.sh index 807329bd95..02954c7aed 100755 --- a/test/elf/relocatable-compressed-debug-info.sh +++ b/test/elf/relocatable-compressed-debug-info.sh @@ -4,6 +4,8 @@ # OneTBB isn't tsan-clean nm mold | grep -q '__tsan_init' && skip +echo 'int main() {}' | $GCC -o /dev/null -xc -g3 -gz - >& /dev/null || skip + cat < void hello() { printf("Hello world\n"); } @@ -16,4 +18,4 @@ EOF ./mold --relocatable -o $t/c.o $t/a.o $t/b.o $CC -B. -o $t/exe $t/c.o -$QEMU $t/exe +$QEMU $t/exe | grep -q 'Hello world'