aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2010-08-02 07:41:04 +0000
committerIan Lance Taylor <ian@airs.com>2010-08-02 07:41:04 +0000
commit0c10a0a69f23d0b0dc9325ca9b1f94096e931ee0 (patch)
tree2f6a142208d3c71d9ac4ddd60b33df052b431316 /gold/testsuite/final_layout.sh
parent*** empty log message *** (diff)
downloadbinutils-gdb-0c10a0a69f23d0b0dc9325ca9b1f94096e931ee0.tar.gz
binutils-gdb-0c10a0a69f23d0b0dc9325ca9b1f94096e931ee0.tar.bz2
binutils-gdb-0c10a0a69f23d0b0dc9325ca9b1f94096e931ee0.zip
* testsuite/final_layout.sh: Use dc to convert from hex to
decimal.
Diffstat (limited to 'gold/testsuite/final_layout.sh')
-rwxr-xr-xgold/testsuite/final_layout.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/gold/testsuite/final_layout.sh b/gold/testsuite/final_layout.sh
index ed7ad78b9e3..01b1f1d987b 100755
--- a/gold/testsuite/final_layout.sh
+++ b/gold/testsuite/final_layout.sh
@@ -27,8 +27,10 @@
check()
{
- func_addr_1=$((16#`grep $2 $1 | awk '{print $1}'`))
- func_addr_2=$((16#`grep $3 $1 | awk '{print $1}'`))
+ func_addr_1=`grep $2 $1 | awk '{print $1}' | tr 'abcdef' 'ABCDEF'`
+ func_addr_1=`echo 16i${func_addr_1}p | dc`
+ func_addr_2=`grep $3 $1 | awk '{print $1}' | tr 'abcdef' 'ABCDEF'`
+ func_addr_2=`echo 16i${func_addr_2}p | dc`
if [ $func_addr_1 -gt $func_addr_2 ]
then
echo "final layout of" $2 "and" $3 "is not right."