I have a few questions about https://wiki.osdev.org/Meaty_Skeleton, which says:
The GCC documentation explicitly states that libgcc requires the freestanding environment to supply the
memcmp
,memcpy
,memmove
, andmemset
functions, as well asabort
on some platforms. We will satisfy this requirement by creating a special kernel C library (libk) that contains the parts of the user-space libc that are freestanding (doesn't require any kernel features) as opposed to hosted libc features that need to do system calls
Alright, I understand that libgcc
is a 'private library' that is used by gcc, i.e. It has significance only during the compilation process, when gcc is in use, kind of like a helper for gcc. Is this right? I understand that the machine I run gcc on is called the build machine, and the host machine is my own OS. What is the freestanding environment specified here? Since gcc runs on the build machine, libgcc must use the build machine libgcc I guess? Where does freestanding come into the picture?
Also, what is the libk? I think that I really don't understand freestanding and hosted environments yet :(