DF-0074 / build.sh
#!/bin/sh # DF-0074 build script. # Builds the two trigger programs. The crafted GPT image (overflow.img) is # produced by build_gpt.py, which requires python3 -- NOT installed on the # DragonFly guest by default. Generate overflow.img on a host with python3: # python3 build_gpt.py overflow.img # and ship it alongside this script (a prebuilt overflow.img is included). set -e cd "$(dirname "$0")" cc -O2 -o trigger trigger.c cc -O2 -o trigger_stress trigger_stress.c echo "Built: trigger, trigger_stress" if [ ! -f overflow.img ]; then echo "WARNING: overflow.img missing -- run: python3 build_gpt.py overflow.img" fi ls -l trigger trigger_stress overflow.img 2>/dev/null || true |