LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 04-20-2011, 12:16 AM   #1
Shum
LQ Newbie
 
Registered: Oct 2007
Posts: 23

Rep: Reputation: 0
Illegal Instruction running software compiled for atom on core2


Hi there!

I am using a 64bit Intel Core2 Duo processor to develop for a system with a 32bit Intel Atom processor.

I'm working inside a linux32 chroot with a userland compiled with -march=atom, this has been working fine for ages except now I have a program that is crashing with the message "Illegal Instruction". I suspect its because the program is compiled for a slightly different processor than the one its running on.

Is there a way to emulate an x86 processor on a x86_64 processor? Will qemu work for this or will it just try to execute the x86 code directly on the processor without emulation?
 
Old 04-21-2011, 07:49 PM   #2
spankbot
Member
 
Registered: Aug 2007
Posts: 131

Rep: Reputation: 16
Quote:
Originally Posted by Shum View Post
Hi there!

I am using a 64bit Intel Core2 Duo processor to develop for a system with a 32bit Intel Atom processor.

I'm working inside a linux32 chroot with a userland compiled with -march=atom, this has been working fine for ages except now I have a program that is crashing with the message "Illegal Instruction". I suspect its because the program is compiled for a slightly different processor than the one its running on.

Is there a way to emulate an x86 processor on a x86_64 processor? Will qemu work for this or will it just try to execute the x86 code directly on the processor without emulation?
What OS are you running? You may simply need to install 32bit compatibility packages. If you actually need to emulate an x86 system, you would need to use something like VMWare, Xen, VirtualBox, etc.
 
Old 04-22-2011, 05:16 AM   #3
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Also, what Atom processor is this. I have an Atom processor and it's 64-bit compatible. Maybe yours is older, or maybe not.
 
Old 04-22-2011, 07:34 AM   #4
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,139

Rep: Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127
Quote:
Originally Posted by Shum View Post
I have a program that is crashing with the message "Illegal Instruction". I suspect its because the program is compiled for a slightly different processor than the one its running on.
I am nearly certain that is not the case.

I think your program simply has a bug in it.

Most likely, the bounds of a local array were exceeded, corrupting the return address on the stack. When the function containing that bug returns, the CPU starts executing instructions somewhere in memory that isn't an instruction.

You should start by using GDB to find out where the program is crashing.

Quote:
Originally Posted by spankbot View Post
You may simply need to install 32bit compatibility packages.
Not correct. If the problem were lack of some 32bit package, the symptom would be very different.

Last edited by johnsfine; 04-22-2011 at 07:37 AM.
 
  


Reply

Tags
qemu


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
illegal instruction amartlk Linux - Newbie 4 11-03-2010 01:00 PM
"Illegal instruction" while running Omnet++ simopal6 Linux - Software 1 02-13-2009 11:13 AM
aticonfig illegal instruction tamtam Slackware 14 09-22-2006 09:27 PM
Illegal instruction madsjakob Linux - Software 0 10-28-2003 08:25 AM


All times are GMT -5. The time now is 09:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration