Bug 131097
Summary: | no /lib/libc.so is present | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Sam Steingold <sds> |
Component: | glibc | Assignee: | Jakub Jelinek <jakub> |
Status: | CLOSED NOTABUG | QA Contact: | Brian Brock <bbrock> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 2 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | athlon | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2004-08-30 06:20:40 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Sam Steingold
2004-08-27 14:55:42 UTC
There is absolutely no need to have a /lib/libc.so file. You need to understand the roles of these files: - *.so.X.Y files are used by the dynamic linker (i.e. at program startup and at dlopen() time). The version number here is mandatory because it must be avoided to link dynamically against a shared library with an incompatible ABI, compared to the one that was intended. - *.so files are used by the linker (ld). These can be symlinks to *.so.X.Y files, or linker scripts (such as /usr/lib/libc.so). So the argument of a dlopen() call should be a "*.so.X.Y" string. Also, dlopen("/lib/libc.so") is not portable because it will not work on GNU/Hurd, where /usr == / and /lib/libc.so is a linker script. some functions, like malloc() and free(), are ABI-independent. for the sake of such functions, a "/lib/libc.so" should be provided. every unix has it. if hurd doesn't, it's not a unix. Even dlopening /lib/libc.so.6 is not going to work and /lib/libc.so is definitely not going to be added. Portable programs must never do anything like that. Furthermore, libfoo.so files are not meant for dynamic linking. If you are writing malloc/free wrappers and want to use the original malloc/free, just use dlsym (RTLD_NEXT, "malloc") etc., or you can use dl_iterate_phdr API to query which libraries are loaded and search for libc among them, though RTLD_NEXT is definitely preferred, as then you can chain multiple wrapper libs together. |