Derek E. Lewis wrote: > Greetings, > > I'm curious if it's possible to link an ELF with multiple objects > compiled for varying CPUs (say, SPARCv8, UltraSPARC-I, etc.) and the > header of the ELF cannot be modified to state that the ELF is for the > CPU of the object of the highest CPU? > > MPlayer's runtime-CPU-detection depends on this, as when a VIS > instruction is executed, SIGILL is caught and VIS instructions are > disabled in the MPlayer binary. Right now, certain objects need to be > built for UltraSPARC-I, because they contain VIS1 instructions. > Obviously, the object cannot be built for SPARCv8. It seems if this > weren't possible, SIGILL would be quite useless, so this is why I think > there's a solution. > > Any thoughts? >
I think you may find the facilities provided by the "moe" command useful; this is what Solaris uses to choose the optimum libc on the x86/amd64 architecture... - Bart -- Bart Smaalders Solaris Kernel Performance barts at cyber.eng.sun.com http://blogs.sun.com/barts