On Mar 31, 2010, at 12:08 PM, krishna manohar wrote: > I am new to pcap.I am writing a sniffer for s3c2440 arm board. > In the process i have cross compile libpcap 1.0.0 and loaded my executable > on the target. > when i run the sniffer application on target pcap_open_live is failing with > Illegal instruction message.
"Illegal instruction" means either that: 1) you cross-compiled libpcap for the wrong version of the instruction set (so that it uses instructions not supported by the machine on which it's running) - ARM, like many other instruction sets, has several different versions, the later ones having more instructions than the earlier ones; 2) the file somehow got corrupted when it got loaded onto the target; 3) some run-time error gets "reported" by forcing an illegal instruction trap. According to http://www.samsung.com/global/business/semiconductor/productInfo.do?fmly_id=229&partnum=S3C2440&ppmi=PartnoSearch "The S3C2440X features an ARM920T core". That core supports the ARMv4T of the ARM instruction set: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0151c/index.html If you compiled libpcap - or your executable, or any other library it uses - for a later version of the instruction set, such as v5, v6 or v7, then the compiler might have generated instructions that the chip can't execute. If you're using GCC, try compiling with -mcpu=arm920t and see whether that works. - This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.