2 ms·
> By "from the loader", do you mean the linker? Most of us regard that as part of compiling. No, I meant from the dynamic loader (like ld.so). > Or are using
by wyldfire 9y ago
> By "from the loader", do you mean the linker? Most of us regard that as part of compiling.
No, I meant from the dynamic loader (like ld.so).
> Or are using .dll or .so files?
Yes, that's a very common idiom for libc and libstdc++/libc++. Yes, you're right that statically linked binaries will not suffer this dependency and usually end up more portable (often at a cost of some memory and security/maintenance).
> The one exception I can see to this is if the program is going to make an OS call that some versions of the OS don't support.
Exactly. This is actually a little less rare than C library features, from what I've seen. But, here, like ImportError and providing weak impls, you can handle ENOSYS.