ascherer / mmix

MMIX 2009 – a RISC computer for the third millennium
http://www-cs-faculty.stanford.edu/~knuth/mmix.html
38 stars 6 forks source link

Roll back the 'shared library' idea. #9

Closed ascherer closed 6 years ago

ascherer commented 6 years ago

The copy test case produces a floating point exception 8 on MacOS. Analysis shows that there are several external relationships from mmix-io.w to both mmix-sim.w and mmix-pipe.w (mmgetchars, mmputchars, stdin_chr, ...) and back (mmix_fopen, mmix_fwrite, mmix_fputs, etc.). The former is the main module for mmix, the latter for mmmix.

ATTOW, it seems impossible to create a working mmix.so shared object containing mmix-pipe.o (in order to resolve external dependencies from mmix-io.o et al.) and simultaneously link this to mmix-sim.o (in order to create mmix).

Miraculously, the shared object approach seems to work on Linux. However, the code base does not support this.