|
|
|
|
|
by _rtld_global_ro
2444 days ago
|
|
errno is thread-safe as it resides in TLS. Part of libc such as pthread is very hard, and so does the dynamic linker. The latter is supposed to handle TLS data as required by TLS/elf spec, which more or less requires a full thread/pthread implementation. As a result, it is rather difficult to break down libc, without writing the whole thing in the first place. golang might be an exception (no linkage against libc), but AFAIK it doesn't use TLS. It's a pretty hard task to tackle libc (not just string functions, obviously), maybe for the same reason there're only a few libc implementations (support full dynamic linking). |
|
To give you an idea, here's a chip used by at least one of the products developed by the author:
https://www.st.com/en/microcontrollers-microprocessors/stm32...
16KB of ram. You're not going to see any linking on this because you're probably running everything in a single address space anyways.