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

Rearranged the precompiled examples into their own directory, edited makefiles...

Rearranged the precompiled examples into their own directory, edited makefiles to save the unprotected (stock) and protected executables.  Also adjustments to ps_analyze and makefiles to allow turning off steps of ps_analyze.
parent 2b24fd6a
No related branches found
No related tags found
No related merge requests found
Showing
with 108 additions and 50 deletions
......@@ -50,28 +50,16 @@ demos/demo.jan_21_2011/ps_demo.sh -text
demos/demo.jan_21_2011/run_gdb.sh -text
demos/demo.jan_21_2011/test_infinite.sh -text
dyna_examples/Makefile -text
dyna_examples/awk.stock -text
dyna_examples/block_copy.c -text
dyna_examples/bzip2.stock -text
dyna_examples/cal.stock -text
dyna_examples/cat.stock -text
dyna_examples/clear.stock -text
dyna_examples/cmd_args_005.c -text
dyna_examples/concolic_test_handshake.c -text
dyna_examples/data.txt -text
dyna_examples/date.stock -text
dyna_examples/df.stock -text
dyna_examples/diff.stock -text
dyna_examples/du.stock -text
dyna_examples/dumbledore_cmd.c -text
dyna_examples/dumbledore_file.c -text
dyna_examples/dumbledore_file_with_fopen_check.c -text
dyna_examples/dumbledore_stdin.c -text
dyna_examples/expr.stock -text
dyna_examples/find.stock -text
dyna_examples/fptest.c -text
dyna_examples/globalfield.c -text
dyna_examples/grep.stock -text
dyna_examples/hanoi.c -text
dyna_examples/hanoi_heap_overrun.c -text
dyna_examples/hanoi_nostrata.c -text
......@@ -80,23 +68,11 @@ dyna_examples/hanoi_overrun_tainted.c -text
dyna_examples/hanoi_overrun_taintedenv.c -text
dyna_examples/hanoi_stack_overrun.c -text
dyna_examples/hello.c -text
dyna_examples/hostname.stock -text
dyna_examples/ipcs.stock -text
dyna_examples/less.stock -text
dyna_examples/ls.stock -text
dyna_examples/malloc.c -text
dyna_examples/memcpy.c -text
dyna_examples/myhanoi.c -text
dyna_examples/nasm.stock -text
dyna_examples/objdump.stock -text
dyna_examples/print_ptr.c -text
dyna_examples/ps.stock -text
dyna_examples/recover_example.c -text
dyna_examples/sdiff.stock -text
dyna_examples/wc.stock -text
dyna_examples/whoami.stock -text
dyna_examples/xcalc.stock -text
dyna_examples/xeyes.stock -text
examples/Makefile -text
examples/block_copy.c -text
examples/cmd_args_005.c -text
......@@ -122,6 +98,31 @@ examples/memcpy.c -text
examples/myhanoi.c -text
examples/print_ptr.c -text
examples/recover_example.c -text
stock_examples/Makefile -text
stock_examples/awk.stock -text
stock_examples/bzip2.stock -text
stock_examples/cal.stock -text
stock_examples/cat.stock -text
stock_examples/clear.stock -text
stock_examples/date.stock -text
stock_examples/df.stock -text
stock_examples/diff.stock -text
stock_examples/du.stock -text
stock_examples/expr.stock -text
stock_examples/find.stock -text
stock_examples/grep.stock -text
stock_examples/hostname.stock -text
stock_examples/ipcs.stock -text
stock_examples/less.stock -text
stock_examples/ls.stock -text
stock_examples/nasm.stock -text
stock_examples/objdump.stock -text
stock_examples/ps.stock -text
stock_examples/sdiff.stock -text
stock_examples/wc.stock -text
stock_examples/whoami.stock -text
stock_examples/xcalc.stock -text
stock_examples/xeyes.stock -text
tools/cover.sh -text
tools/db/drop_my_tables.sh -text
tools/db/pdb.create.tbl -text
......
......@@ -4,34 +4,35 @@
CC=gcc
CXX=g++
CFLAGS=-O2
CFLAGS=-O
LD=gcc
.SUFFIXES: .o .c .cpp .exe .stock .protected
.SUFFIXES: .o .c .cpp .stock .protected
exes=hanoi.exe hanoi_overrun.exe hanoi_heap_overrun.exe hanoi_stack_overrun.exe print_ptr.exe malloc.exe block_copy.exe hello.exe hanoi_overrun_tainted.exe hanoi_overrun_taintedenv.exe memcpy.exe cmd_args_005.exe dumbledore_stdin.exe dumbledore_cmd.exe dumbledore_file.exe
exes=hanoi.protected hanoi_overrun.protected hanoi_heap_overrun.protected hanoi_stack_overrun.protected print_ptr.protected malloc.protected block_copy.protected hello.protected hanoi_overrun_tainted.protected hanoi_overrun_taintedenv.protected memcpy.protected cmd_args_005.protected dumbledore_stdin.protected dumbledore_cmd.protected dumbledore_file.protected
protected_exes=awk.protected bzip2.protected cal.protected cat.protected clear.protected date.protected df.protected diff.protected du.protected expr.protected find.protected grep.protected hostname.protected ipcs.protected less.protected ls.protected nasm.protected objdump.protected ps.protected sdiff.protected wc.protected whoami.protected xeyes.protected xcalc.protected
ilr=on
all: env_check ${exes} ${protected_exes}
all: env_check ${exes}
.PHONY: env_check
.stock.protected: .PHONY
${PEASOUP_HOME}/tools/ps_analyze.sh $< $@
.o.exe: .PHONY
$(CC) $< -o $@
${PEASOUP_HOME}/tools/ps_analyze.sh $@ $@
.o.stock:
${PEASOUP_HOME}/tools/ps_link.sh $< -o $@
.c.o: .PHONY
${CC} $< -c
.stock.protected:
${PEASOUP_HOME}/tools/ps_analyze.sh $< $@ --step ilr=${ilr}
.cpp.o: .PHONY
${CXX} $<
.c.o:
${PEASOUP_HOME}/tools/ps_comp.sh $<
chopzero: .PHONY
.cpp.o:
${PEASOUP_HOME}/tools/ps_comp++.sh $<
chopzero:
@ if [ ! -f chopzero ]; then gcc chopzero.c -o chopzero -O3 ; fi
$(exes): ${STRATA}/lib/x86_linux/libstrata.a
......@@ -60,15 +61,13 @@ env_check:
clean:
rm -f *.o *.syms *.map chopzero hanoi hanoi_overrun hanoi_heap_overrun malloc block_copy print_ptr hanoi_stack_overrun dumbledore a.out memcpy hanoi_overrun_taintedenv dumbledore_cmd hanoi_overrun_tainted hello cmd_args_005
rm -f *.exe *.dis *.data *.idb *.log *.ncexe *.annot *.readelf temp.* *.temp *.stratafied *.asm *.SMPobjdump *.id0 *.id1 *.til *.nam
rm -f *.exe *.dis *.data *.idb *.log *.ncexe *.annot *.readelf temp.* *.temp *.stratafied *.asm *.SMPobjdump *.id0 *.id1 *.til *.nam *.stock *.protected
rm -Rf concolic.files_*
rm -Rf peasoup_executable_directory.*
rm -f strata.log.*
rm -f *.sym
rm -f *.protected
if [ ! "X" = "X"${PGUSER} ]; then sh ../tools/db/drop_my_tables.sh; sh ../tools/db/pdb_setup.sh; fi
concclean:
rm -Rf concolic.files_*
rm strata.log.*
File mode changed from 100755 to 100644
......@@ -7,21 +7,21 @@ CXX=DO_NOT_USE
CFLAGS=DO_NOT_USE
LD=DO_NOT_USE
.SUFFIXES: .o .c .cpp .exe
.SUFFIXES: .o .c .cpp .stock .protected
exes=hanoi.exe hanoi_overrun.exe hanoi_heap_overrun.exe hanoi_stack_overrun.exe print_ptr.exe malloc.exe block_copy.exe hello.exe hanoi_overrun_tainted.exe hanoi_overrun_taintedenv.exe memcpy.exe cmd_args_005.exe dumbledore_stdin.exe dumbledore_cmd.exe dumbledore_file.exe
exes=hanoi.protected hanoi_overrun.protected hanoi_heap_overrun.protected hanoi_stack_overrun.protected print_ptr.protected malloc.protected block_copy.protected hello.protected hanoi_overrun_tainted.protected hanoi_overrun_taintedenv.protected memcpy.protected cmd_args_005.protected dumbledore_stdin.protected dumbledore_cmd.protected dumbledore_file.protected
ilr=on
all: env_check ${exes}
.PHONY: env_check
.o.exe:
.o.stock:
${PEASOUP_HOME}/tools/ps_link.sh $< -o $@
${PEASOUP_HOME}/tools/ps_analyze.sh $@ $@
.stock.protected:
${PEASOUP_HOME}/tools/ps_analyze.sh $< $@ --step ilr=${ilr}
.c.o:
${PEASOUP_HOME}/tools/ps_comp.sh $<
......@@ -58,7 +58,7 @@ env_check:
clean:
rm -f *.o *.syms *.map chopzero hanoi hanoi_overrun hanoi_heap_overrun malloc block_copy print_ptr hanoi_stack_overrun dumbledore a.out memcpy hanoi_overrun_taintedenv dumbledore_cmd hanoi_overrun_tainted hello cmd_args_005
rm -f *.exe *.dis *.data *.idb *.log *.ncexe *.annot *.readelf temp.* *.temp *.stratafied *.asm *.SMPobjdump *.id0 *.id1 *.til *.nam
rm -f *.exe *.dis *.data *.idb *.log *.ncexe *.annot *.readelf temp.* *.temp *.stratafied *.asm *.SMPobjdump *.id0 *.id1 *.til *.nam *.stock *.protected
rm -Rf concolic.files_*
rm -Rf peasoup_executable_directory.*
rm -f strata.log.*
......
File mode changed from 100755 to 100644
CC=gcc
CXX=g++
CFLAGS=-O2
ilr=on
.SUFFIXES: .stock .protected
protected_exes=awk.protected bzip2.protected cal.protected cat.protected clear.protected date.protected df.protected diff.protected du.protected expr.protected find.protected grep.protected hostname.protected ipcs.protected less.protected ls.protected nasm.protected objdump.protected ps.protected sdiff.protected wc.protected whoami.protected xeyes.protected xcalc.protected
all: env_check ${protected_exes}
.PHONY: env_check
.stock.protected: .PHONY
${PEASOUP_HOME}/tools/ps_analyze.sh $< $@ --step ilr=${ilr}
$(protected_exes): ${STRATA}/lib/x86_linux/libstrata.a
env_check:
@echo checking env vars; \
if [ "X${TOOLCHAIN}" = "X" ]; then \
echo TOOLCHAIN environment variable should be set.; \
exit -1;\
elif [ "X${STRATA}" = "X" ]; then \
echo STRATA environment variable should be set. ;\
exit -1;\
elif [ "X${SMPSA_HOME}" = "X" ]; then \
echo SMPSA_HOME environment variable should be set.; \
exit -1;\
elif [ "X${PEASOUP_HOME}" = "X" ]; then \
echo PEASOUP_HOME environment variable should be set.; \
exit -1;\
elif [ "X${STRATA_HOME}" = "X" ]; then \
echo STRATA_HOME environment variable should be set.; \
exit -1;\
fi ;
clean:
rm -f *.o *.syms *.map chopzero hanoi hanoi_overrun hanoi_heap_overrun malloc block_copy print_ptr hanoi_stack_overrun dumbledore a.out memcpy hanoi_overrun_taintedenv dumbledore_cmd hanoi_overrun_tainted hello cmd_args_005
rm -f *.exe *.dis *.data *.idb *.log *.ncexe *.annot *.readelf temp.* *.temp *.stratafied *.asm *.SMPobjdump *.id0 *.id1 *.til *.nam
rm -Rf concolic.files_*
rm -Rf peasoup_executable_directory.*
rm -f strata.log.*
rm -f *.sym
rm -f *.protected
if [ ! "X" = "X"${PGUSER} ]; then sh ../tools/db/drop_my_tables.sh; sh ../tools/db/pdb_setup.sh; fi
concclean:
rm -Rf concolic.files_*
rm strata.log.*
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
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