4 env |
sort |
sed 's/^/# /'
9 echo "ok $tid # skip executable not found"; return; fi
10 objty
=$
(objdump
-f
$exe |
sed -n
'/^.*: *file format \(.*\)/s//\1/p')
11 echo "# $exe object type $objty"
14 if f
=$
(objdump
-p
$exe |
15 sed -n
'/^ *STACK / { n; s/^.*flags *\([-rwx]*\).*/\1/p; }')
17 echo "# STACK segment flags $f"
19 rw-
) echo "ok $tid stack not executable" ;;
20 rwx
) echo "not ok $tid executable stack" ;;
21 *) echo "not ok $tid unexpected stack-segment flags" ;;
24 echo "not ok $tid failed to find stack-segment flags"
28 if nm
$exe |
grep __enable_execute_stack
; then
29 echo "not ok $tid # found call to __enable_execute_stack"
31 echo "ok $tid # stack maybe not executable"
37 check_exe
1 finally-test