On Sat, Dec 6, 2008 at 3:11 PM, "C. Bergström" <[EMAIL PROTECTED]> wrote: > > > LD_PRELOAD=./libc.so.1 cp libc.so.1 /lib/amd64/ > > both result in > > Bus Error (core dumped)
I forgot to mention, for LD_PRELOAD[_32|64] and LD_LIBRARY_PATH[_32|64] to work as expected for a new (foreign) libc which resides in a non-default location (not /lib/isaexec()/libc.so), you are required to run subsequent testing commands with "/usr/lib/ld.so.1 <YourTestCommand>". This problem only occurrs, if the version of libc that you want being used by a certain executable is not currently in its default location. Hence for the lofs procedure as desribed in my previous mail, you do not need /usr/lib/ld.so.1. Here is a practical example: Insignia (later FWB)'s SoftWindows95 does not run since Solaris 10 anymore (SIGBUS after exec() ). If you copy Solaris8's or 9's libc.so into a private location, then run "LD_PRELOAD=/foo/testingplayground/libc.so /usr/lib/ld.so.1 /opt/SoftWindows/bin/SoftWindows95" then you can continue to use it on Solaris 10 or 11 based systems (a few other things are also required to do so, but this would be off-topic in the given context). Without /usr/lib/ld.so.1 nothing at all would change and it would still crash with a SIGBUS, exactly the same as without your private version of Sol8's libc.so. The described swin scenario is a case, where you do depend on the ld.so.1 method, because you cannot really replace /lib/libc.so on a Sol[10|11] system globally with a legacy version from Solaris8, as virtually nothing of the commands linked against the higher version would run anymore (in theory it would indeed work with the new kernel in a limited way (not sure about multi-threading), but you also would need to downgrade all bin/* stuff). Anyway, for the described reasons both the ld.so.1 and the lofs do have their appropriate areas of use, it depends on what you need. In a few cases either one will work for a given problem, else only one XOR the other. %m _______________________________________________ opensolaris-discuss mailing list [email protected]
