]>
Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
feat: add ulibc — minimal userspace C library
Create user/ulibc/ with headers and implementations for:
- crt0.S: _start entry point that calls main() then exit()
- syscall.h: raw INT 0x80 wrappers (_syscall0..5)
- unistd.c/h: POSIX wrappers (read, write, open, close, fork,
execve, pipe, dup2, brk, getpid, chdir, mkdir, etc)
- string.c/h: memcpy, memset, memmove, strlen, strcmp, strcpy,
strchr, strcat, etc
- stdlib.c/h: malloc/free (bump allocator via brk), calloc,
realloc, atoi, exit
- stdio.c/h: printf, puts, putchar, snprintf, vsnprintf with
format specifiers: %d %i %u %x %X %s %c %p %%
- errno.c/h: errno variable + error codes + __syscall_ret helper
Build system: user/ulibc/Makefile produces libulibc.a static lib.
Main Makefile updated with ULIBC_LIB target.
Future user programs can link against libulibc.a instead of
duplicating syscall wrappers inline.
Passes: make (kernel), ulibc builds clean, QEMU smoke test OK.
15 files changed: