Warning
Still a work in progress
My poor attempt of re-writting a small portion of libc without libc but syscalls
This is not intended for any use.
Purely written out of fun and for demo purposes.
sudo pacman -S make gcc # Archlinux
sudo apt install make gcc # Debian based
sudo dnf install make gcc # Red Hat based
make # compiles binary
make run # run's binary
make test
test
= compile lib in all formats (.so,.a,.c) for testingstatic_lib
= creates static libno_libc.a
instatic_lib/
dirshared_lib
= creates shared objects (.so) inshared_lib/
( it is the default target )all
= uses raw c files ininclude/src/
and links them tosrc/main.c
- The default make compiles the header files to
.so
files inlib/
which are then used to linksrc/main.c
- compiled binary is located in
bin/
include/
= header include filesinclude/src/
= source include files for the header include filessrc/
= source file(s), that's wheremain.c
is located ( Program Entry )
shared_iib/
= compiled shared object files (.so
files )static_lib/
= containsno_libc.a
for static linkingbin
= ouput binary is placed
scripts/
( no longer in use ) = scripts to compile shared files and check shared files ( used in old makefile )
- _read
- _write
- _print
- _println
- _scanline
- _scan
- _printf
- _scanf
- _exit
- _free
- _malloc
- _memset
- _brk
- _sbrk
- _strlen
- _reverse
- _itoa
- _stoa
- _memcpy
- _memcmp
- _format
- _sprintf
- _snprintf
- _open
- _creat
- _close
- _mmap
- _munmap