aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--binutils/embedspu.sh6
-rw-r--r--ld/testsuite/ld-elfvers/vers.exp4
2 files changed, 2 insertions, 8 deletions
diff --git a/binutils/embedspu.sh b/binutils/embedspu.sh
index 361206f..d727739 100644
--- a/binutils/embedspu.sh
+++ b/binutils/embedspu.sh
@@ -108,11 +108,7 @@ main ()
READELF="$prog"
# Sanity check the input file
- match="Class:.*ELF32
-Type:.*EXEC
-Machine:.*SPU
-Machine:.*17"
- if test `${READELF} -h ${INFILE} | grep "${match}" | wc -l` != 3
+ if test `${READELF} -h ${INFILE} | sed -n -e '/Class:.*ELF32/p' -e '/Type:.*EXEC/p' -e '/Machine:.*SPU/p' -e '/Machine:.*17/p' | sed -n '$='` != 3
then
echo "${INFILE}: Does not appear to be an SPU executable"
exit 1
diff --git a/ld/testsuite/ld-elfvers/vers.exp b/ld/testsuite/ld-elfvers/vers.exp
index 9af6bb9..3e2ba2a 100644
--- a/ld/testsuite/ld-elfvers/vers.exp
+++ b/ld/testsuite/ld-elfvers/vers.exp
@@ -109,9 +109,7 @@ proc test_ar { test lib object expect } {
return
}
- set cmd "$nm --print-armap $tmpdir/$lib | grep \" in \" | grep \"VERS
-bar
-foo\" | grep -v ^\\\\. | sort > $tmpdir/nm.out"
+ set cmd "$nm --print-armap $tmpdir/$lib | sed -n -e /^\\\\./d -e \"/^VERS.* in /p\" -e \"/bar.* in /p\" -e \"/foo.* in /p\" | sort > $tmpdir/nm.out"
verbose -log $cmd
catch "exec $cmd" exec_output
if [string match "" $exec_output] then {