illegal instruction - create compile variants ?

Richard W.M. Jones rjones at redhat.com
Mon May 2 00:51:23 UTC 2011


On Mon, May 02, 2011 at 08:50:48AM +1000, David Timms wrote:
> On 02/05/11 06:31, Kevin Kofler wrote:
> > David Timms wrote:
> >> Should I be suggesting to upstream to attempt to detect CPU before
> >> running non-available instructions, eg as part of app startup ?
> Further, what can I run over an existing executable to detect what CPU 
> it was built for, ie what instuctions have been included ?

This isn't possible in general.

Disassembling the code (objdump -d) will give you a subset of
instructions that it could possibly execute, but no indication
(without considerable extra manual work) of what instructions it would
actually execute.

Plus you'd then need to sit there with the Intel and AMD PRMs trying
to work out which instruction corresponds to which CPU feature.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v


More information about the devel mailing list