Files
2ine-tms34010/make.sh
T
Ryan C. Gordon 161cde892e Initial add. Runs exactly one program.
Run make.sh on a Linux box to see it run tests/hello.exe!
2016-09-19 19:41:11 -04:00

17 lines
756 B
Bash
Executable File

#!/bin/sh
# Note that this doesn't work on Mac OS X because I can't mmap()
# address 0x10000, which is the usual base address for OS/2 binaries.
# It appears the address is already accessible when main() begins, but no
# objects seem to be loaded there. I don't know what it is...maybe some
# thing allocated by the C runtime at startup? Have to solve that somehow or
# give up on Mac support.
#
# 32-bit Linux totally lets me have that space, though. :)
#clang -pagezero_size 0x1000 -image_base 0x100000000 -Wall -O0 -ggdb3 -o lx_loader lx_loader.c && ./lx_loader ./cmd.exe
gcc -std=c99 -Wall -O0 -ggdb3 -o lx_dump lx_dump.c &&
gcc -m32 -std=c99 -Wall -O0 -ggdb3 -o lx_loader lx_loader.c &&
./lx_dump tests/hello.exe &&
./lx_loader tests/hello.exe