blob: 787cf9b6b04a68374047748a231b7fe6dee2c7b1 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#!/bin/sh
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01002# SPDX-License-Identifier: GPL-2.0
Linus Torvalds1da177e2005-04-16 15:20:36 -07003dir=$(dirname $0)
4CC=$1
5OBJDUMP=$2
6tmp=${TMPDIR:-/tmp}
7out=$tmp/out$$.o
8$CC -c $dir/check-gas-asm.S -o $out
9res=$($OBJDUMP -r --section .data $out | fgrep 00004 | tr -s ' ' |cut -f3 -d' ')
10rm -f $out
11if [ $res != ".text" ]; then
12 echo buggy
13else
14 echo good
15fi
16exit 0