Bug 249256
| Summary: | ld.so too verbose when it can't LD_PRELOAD a 32 bit library on a 64 bit OS | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 4 | Reporter: | James Pearson <james-p> | ||||
| Component: | glibc | Assignee: | Jakub Jelinek <jakub> | ||||
| Status: | CLOSED NOTABUG | QA Contact: | Brian Brock <bbrock> | ||||
| Severity: | low | Docs Contact: | |||||
| Priority: | low | ||||||
| Version: | 4.4 | CC: | fweimer, john | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2007-07-23 12:06:32 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: | |||||||
| Attachments: |
|
||||||
|
Description
James Pearson
2007-07-23 11:53:54 UTC
Created attachment 159775 [details]
Patch to glibc to suppress LD_PRELOAD 'ERROR'
No, the diagnostics is totally appropriate, in some cases it might not be a
problem when the preloaded library is purely optional, but ld.so can't know that.
If you don't want to see any diagnostic and the preloaded lib is really needed
just for one arch and not for the other, just build a dummy shared library,
stick say the real preload lib into /lib/libpreload.so, the dummy into
/lib64/libpreload.so and use LD_PRELOAD=libpreload.so.
Or you can use even full path, if you have say /path/lib/libpreload.so containing
the 32-bit preload lib and /path/lib64/libpreload.so containing 64-bit preload
lib (either of those can be a dummy gcc -shared -fpic -o libpreload.so -xc
/dev/null -m{32,64} built lib) and LD_PRELOAD=/path/'$LIB'/libpthread.so whatever
Thanks for the info ... I assume the '$LIB' is some internal variable to the runtime linker - as it not defined in the enviroment ??? Is this documented somewhere - there is no mention of this in the ld.so man page $LIB is a dynamic string token recognized by ld.so similar to $ORIGIN or $PLATFORM. It expands to lib or lib64 depending on architecture of ld.so (x86_64, s390x, ppc64 ld.so expand it to lib64, i?86, s390, ppc, ia64 ld.so to lib). Not meaning to hijack bug, but this is still overly verbose as it warns for each library during load, rather than just once. Is there a dynamic string token that applies to the arch of the binary ld.so is loading? Steam by default preloads a 32bit lib for their overlay support, warnings appear for 64bit binaries but I cant understand how one could make a dummy library, use $LIB to load either 32/64 overlay lib, and yet not break the 32bit lib loading, as it would always pick lib64 for a 64bit system, right? |