Skip to content
Snippets Groups Projects
Commit 20d7de95 authored by jdh8d's avatar jdh8d
Browse files

Fixes to have ps_analyze.sh, etc. ps_analyze.sh now does concolic testing and...

Fixes to have ps_analyze.sh, etc.  ps_analyze.sh now does concolic testing and generates the MEDS plugin.
parent 800b2028
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,9 @@ examples/recover_example.c -text
tools/do_concolic.sh -text
tools/generate_exe.sh -text
tools/getsyms.sh -text
tools/peasoup_analyze.sh -text
tools/peasoup_link -text
tools/peasoup_link++ -text
tools/ps_analyze.sh -text
tools/ps_comp.sh -text
tools/ps_link.sh -text
tools/test_controller.sh -text
......@@ -23,6 +23,7 @@ if [ -z $2 ]; then
fi
orig_exe=$1
newname=a
if [ -z $2 ]; then
stratafied_exe=$orig_exe
......@@ -33,15 +34,15 @@ fi
echo "Original program: $orig_exe New program: $stratafied_exe"
name=`basename $orig_exe`
newdir=$name.$$
newdir=peasoup_executable_directory.$name.$$
echo "Switching to directory $newdir"
mkdir $newdir
cp $orig_exe $newdir/$name.orig
cp $orig_exe $newdir/$newname.ncexe
cd $newdir
sh $STRATA_HOME/tools/pc_confinement/stratafy_with_pc_confine.sh $name.orig $name.stratafied
sh $STRATA_HOME/tools/pc_confinement/stratafy_with_pc_confine.sh $newname.ncexe $newname.stratafied
# We've now got a stratafied program
......@@ -50,16 +51,23 @@ sh $STRATA_HOME/tools/pc_confinement/stratafy_with_pc_confine.sh $name.orig $nam
current_dir=`pwd`
peasoup_binary=$name.peasoup
peasoup_binary=$name.sh
echo "#!/bin/sh" >> $peasoup_binary
echo "" >> $peasoup_binary
echo "#for some reason, pc confinment is broker"
echo "#STRATA_PC_CONFINE=1 $current_dir/$name.stratafied \$*" >> $peasoup_binary
echo "$current_dir/$name.stratafied \$*" >> $peasoup_binary
echo "$PEASOUP_HOME/tools/ps_run.sh $current_dir \$*" >> $peasoup_binary
#echo "#for some reason, pc confinement is brokern"
#echo "#STRATA_PC_CONFINE=1 $current_dir/$name.stratafied \$*" >> $peasoup_binary
#echo "$current_dir/$name.stratafied \$*" >> $peasoup_binary
chmod +x $peasoup_binary
$SMPSA_HOME/SMP-analyze.sh a.ncexe
$PEASOUP_HOME/tools/do_concolic.sh a
cd -
cp $newdir/$name.peasoup $stratafied_exe
cp $newdir/$name.sh $stratafied_exe
#!/bin/sh
#
# this odd loop is a way to stop/error check that no one can pass a gcc flag
# to gcc and get a reasonable compile-step.
#
for i in $*
do
gcc -fno-stack-protector -c $i
done
#!/bin/sh
#
# don't pass me flags or i'll smack you.
#
for i in $*
do
echo $i|egrep "^-";
if [ 0 -eq $? ] ; then
echo SMACK\! No flags to this script, only files to link
exit 1
fi
if [ ! -f $i ]; then
echo File $i not found
exit 2
fi
done
gcc -Bstatic -static $*
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment