^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) #!/bin/sh
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) # SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) dir=$(dirname $0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) CC=$1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) OBJDUMP=$2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) tmp=${TMPDIR:-/tmp}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) out=$tmp/out$$.o
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) $CC -c $dir/check-gas-asm.S -o $out
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) res=$($OBJDUMP -r --section .data $out | fgrep 00004 | tr -s ' ' |cut -f3 -d' ')
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) rm -f $out
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) if [ $res != ".text" ]; then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) echo buggy
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) echo good
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) fi
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) exit 0