This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Failed to load latest commit information.
startc is a minimal freestanding C runtime library for a 32-bit i386 PC. Its job is to put the machine in a state which can be comfortably programmed using ordinary C semantics, without constraining the application programmer's architectural policy choices. Picking up where a stage-2 bootloader leaves off, startc will configure the memory model for a flat address space, configure the interrupt controller so that IRQs can be distinguished from CPU exceptions, and install an interrupt table equipped with forwarding stubs that invoke application-provided handlers. After setup work, startc allocates a 16K bootstrap stack and jumps to the application entrypoint. The include/ directory contains a set of header files sufficient for a conforming freestanding implementation of C99. The include/startc/ subdirectory exposes the library's data structures and entrypoint signatures. Finally, startc implements memmove, memcpy, memcmp, and memset, which GCC requires a freestanding library implementation to provide. These are declared as weak symbols so that the application can easily override them. The demo/ directory contains a minimal "hello world" example. You can run 'make hello' to build it or 'make demo' to launch it inside a QEMU VM. To set your new program up to run via startc, simply include this line in your makefile. It will configure the relevant compiler and linker options for the freestanding target and will add its include path and library path. > include startc/link.mk