Creating sysroot and Meaty Skeleton
Posted: Sun Jan 09, 2022 2:34 pm
I've completed Bare Bones and now I'm getting to Meaty Skeleton.
I have read the article several times and would like to make sure that I understood everything correctly.
As far as I understand, now my task is to create a properly organized sysroot folder, which will later be used by "Hosted GCC" to compile user space programs for my OS.
My sysroot should contain the files necessary for "Hosted GCC", and have this structure:
/sysroot/usr/include - contains header files with declarations of functions in user space to be used Hosted by GCC when generating programs(for example stdio.h or stdlib.h)
/sysroot/usr/lib - contains the object file libc.a code containing functions to user space(for example, malloc()), which, when you create a user-space programs will be linked to the program
The subsequent work boils down to implementing the user space functions and combining them into libc.a
Right?
I have read the article several times and would like to make sure that I understood everything correctly.
As far as I understand, now my task is to create a properly organized sysroot folder, which will later be used by "Hosted GCC" to compile user space programs for my OS.
My sysroot should contain the files necessary for "Hosted GCC", and have this structure:
/sysroot/usr/include - contains header files with declarations of functions in user space to be used Hosted by GCC when generating programs(for example stdio.h or stdlib.h)
/sysroot/usr/lib - contains the object file libc.a code containing functions to user space(for example, malloc()), which, when you create a user-space programs will be linked to the program
The subsequent work boils down to implementing the user space functions and combining them into libc.a
Right?