summaryrefslogtreecommitdiff
path: root/crenshaw/build.sh
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2018-08-12 21:55:28 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2018-08-12 21:55:28 +0200
commite2a3a2b217e8dcc1e3f4ec67c00a7a98d07fa698 (patch)
treee9b44b9e2fbc8e53c743165561ebb76f9a5d4c1f /crenshaw/build.sh
parent8a4cfc2e63cc21328dbffd11d1a0455d806d48ef (diff)
downloadcompilertests-e2a3a2b217e8dcc1e3f4ec67c00a7a98d07fa698.tar.gz
compilertests-e2a3a2b217e8dcc1e3f4ec67c00a7a98d07fa698.tar.bz2
crenshaw: small emulator for testing with capstone and unicorn
Diffstat (limited to 'crenshaw/build.sh')
-rwxr-xr-xcrenshaw/build.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/crenshaw/build.sh b/crenshaw/build.sh
index 5ef9938..5373e01 100755
--- a/crenshaw/build.sh
+++ b/crenshaw/build.sh
@@ -1,7 +1,10 @@
fpc main.pas
./main < test.prog > test.asm
-nasm -f elf32 test.asm
-gcc -m32 -march=i486 -ffreestanding -o test test.o
-objcopy -O binary --only-section=.text test test.bin
+nasm -o test.bin -f bin test.asm
+#nasm -f elf32 test.asm
+#gcc -m32 -march=i486 -ffreestanding -o test test.o
+#objcopy -O binary --only-section=.text test test.bin
ndisasm -b32 test.bin
-./test
+gcc -g -Wall -std=c99 -o emul emul.c -lunicorn -lcapstone -pthread
+./emul test.bin
+#./test