Simple Loader + Free COFF
This is a Simple Loader that executes a Crystal Palace PICO to free() the loader before passing execution to the DLL.
Project Files
Notes
changes.diff shows the changes between Simple Loader and this project. The only differences are the code to reference and run our added PICO.
This project is like Simple Loader except it runs a Crystal Palace PICO (executable COFF) to run our DLL and free() our PIC loader.
We use a reference to go to find the beginning of our PIC in memory. This works, because thanks to make pic +gofirst the go function will exist at position 0 of our program.
free.c is the source code to our PICO (Crystal Palace COFF) to free() its caller before passing execution to our DLL.
The RunViaFreeCOFF runs our PICO. This function calls APIs in the Tradecraft Garden Library, whose functions are in tcg.h and the library is merged via loader.spec. A PICO-runner is not a generic COFF runner. A PICO is a normalized COFF with several parts stripped out and loading directives prepended to it.
License
This project is licensed under the BSD License.