3 ms·
If I had time, I'd make a library (perhaps musl-based?) that implements "libc but without all the parts you're not actually supposed to use."
by jasonhansel 7y ago
If I had time, I'd make a library (perhaps musl-based?) that implements "libc but without all the parts you're not actually supposed to use."
- Gibbon1 7y agoThat make me wonder how hard it would be to just strip the bad functions out of the library.
- anfilt 7y agoWell your std c library is generally just a collection of .o, .a, .lib files. So you could use gnu bin tools to remove symbols of your choosing. However good luck getting your system to build software because that would modify the stdlib for all things compiled on your system. You could also tell gcc or clang not to link to the std library and providr your own with just a few switches on invocation of the compiler
- Gibbon1 7y agoOther thought would be to put the dlls with unsafe functions in different location than the safer ones and throw up a warning when an application loads them.
- bakpakin 7y agoCheckout libk https://c.hale.su/lexi/libk/home https://c.hale.su/lexi/libk/home