On Tuesday 30 October 2001 02:52 pm, you wrote: > > One possiiblity: IIRC, if you do an strace of a progrma using the dynamic > > linker using say, libfoo, it will be checking for something like > > i686/mmx/libfoo, i686/libfoo first..Perhaps this can be used? > > Sorry, too much technical for me :-(
OK, let's clarify. Here is a pasting of the strace (system call log), for a program: open("/usr/lib/qt2/lib/libICE.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) open("i686/mmx/libICE.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) open("i686/libICE.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) open("mmx/libICE.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) open("libICE.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/X11R6/lib/libICE.so.6", O_RDONLY) = 3 THis is the linked trying to open a library. Notice that the linked is trying to load an i686/MMX optimized version of the library first, although not in particularly nice places (looks like a relative dir from here). This might be useful for packaing, if one simply includes multiples copies of performance-sensitive libraries, such as avifile, and let's ld.so pick the right one. Unfortunatel,y this probably doesn't work for dlopen()'ed libraries.