mirror of
https://github.com/rui314/mold.git
synced 2024-10-26 21:20:46 +03:00
13 lines
253 B
Bash
Executable File
13 lines
253 B
Bash
Executable File
#!/bin/bash
|
|
. $(dirname $0)/common.inc
|
|
|
|
cat <<EOF | $CC -o $t/a.o -c -xassembler -
|
|
.section .note.GNU-stack, "x"
|
|
EOF
|
|
|
|
cat <<EOF | $CC -o $t/b.o -c -xc -
|
|
int main() {}
|
|
EOF
|
|
|
|
$GCC -B. -o $t/exe $t/a.o $t/b.o 2>&1 | grep -q 'may cause a segmentation fault'
|