Nolibc: a minimal C-library replacement shipped with the kernel
Nolibc: a minimal C-library replacement shipped with the kernel
Posted Jan 22, 2023 15:40 UTC (Sun) by eru (subscriber, #2753)Parent article: Nolibc: a minimal C-library replacement shipped with the kernel
Posted Jan 22, 2023 22:23 UTC (Sun)
by wtarreau (subscriber, #51152)
[Link] (2 responses)
In case of multiple files, yes definitely, but most of them are quite small, and multi-file projects relying on something like nolibc are rare.
A few functions had to be exported and we found how to do it by declaring them with the weak attribute (e.g. raise(), memcpy() and a few other ones that libgcc may depend on). In this case it's during the linking stage that the linker decides to keep a single copy of each. That's also how we dealt with errno/environ/etc lately. Eventually we could imagine replacing all static functions with weak ones if it proves to provide any benefit (not convinced at the moment).
Posted Feb 1, 2023 5:45 UTC (Wed)
by remexre (subscriber, #138784)
[Link] (1 responses)
Posted Feb 1, 2023 13:11 UTC (Wed)
by mathstuf (subscriber, #69389)
[Link]
Nolibc: a minimal C-library replacement shipped with the kernel
Nolibc: a minimal C-library replacement shipped with the kernel
Nolibc: a minimal C-library replacement shipped with the kernel