Simple Loader + Free PICO
This is a Simple Loader that executes a Crystal Palace PICO to free() the loader before passing execution to the DLL.
Project Files
Notes
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 __text_begin() to find the beginning of our PIC in memory. This function is a Crystal Palace linker intrinsic. It's resolved to the right value at link time.
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.