xref: /OK3568_Linux_fs/kernel/arch/ia64/scripts/check-gas (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun#!/bin/sh
2*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0
3*4882a593Smuzhiyundir=$(dirname $0)
4*4882a593SmuzhiyunCC=$1
5*4882a593SmuzhiyunOBJDUMP=$2
6*4882a593Smuzhiyuntmp=${TMPDIR:-/tmp}
7*4882a593Smuzhiyunout=$tmp/out$$.o
8*4882a593Smuzhiyun$CC -c $dir/check-gas-asm.S -o $out
9*4882a593Smuzhiyunres=$($OBJDUMP -r --section .data $out | fgrep 00004 | tr -s ' ' |cut -f3 -d' ')
10*4882a593Smuzhiyunrm -f $out
11*4882a593Smuzhiyunif [ $res != ".text" ]; then
12*4882a593Smuzhiyun	echo buggy
13*4882a593Smuzhiyunelse
14*4882a593Smuzhiyun	echo good
15*4882a593Smuzhiyunfi
16*4882a593Smuzhiyunexit 0
17