I received SIGILL signal when a ELF file execute on Cortex-A9 board.
Linux - Embedded & Single-board computerThis forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
arm-linux-gnueabi-gcc -Wall -g -o a a.c
#include <stdio.h>
int
main(int argc, char** argv)
{
return 0;
}
- problem's symptoms:
*SWITCH# ls -al /lib/ld-2.17.so /lib/ld-linux.so.3 /lib/libc-2.17.so /lib/libc.so.6
-rwxrwxrwx 1 admin admin 131448 Jan 1 00:07 /lib/ld-2.17.so*
lrwxrwxrwx 1 admin admin 10 Jan 1 00:07 /lib/ld-linux.so.3 -> ld-2.17.so*
-rwxrwxrwx 1 admin admin 1224732 Jan 1 00:07 /lib/libc-2.17.so*
lrwxrwxrwx 1 admin admin 12 Jan 1 00:07 /lib/libc.so.6 -> libc-2.17.so*
*SWITCH#
*SWITCH# strace ./a
execve("./a", ["./a"], [/* 21 vars */]) = 0
brk(0) = 0xf81000
uname({sys="Linux", node="SWITCH", ...}) = 0
--- SIGILL {si_signo=SIGILL, si_code=ILL_ILLOPC, si_addr=0x4c5de180} ---
+++ killed by SIGILL (core dumped) +++ Illegal instruction
*SWITCH#
*SWITCH# gdb ./a
GNU gdb (GDB) 7.5
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabi".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /etc/.config/lee/a...done.
(gdb) list
warning: Source file is more recent than executable.
1 #include <stdio.h>
2
3 int
4 main(int argc, char** argv)
5 {
6 return 0;
7 }
(gdb)
Line number 8 out of range; a.c has 7 lines.
(gdb) b main
Breakpoint 1 at 0x8400: file a.c, line 6.
(gdb) r
Starting program: /etc/.config/lee/a
Program received signal SIGILL, Illegal instruction.
0x4c5de180 in ?? () from /lib/ld-linux.so.3
(gdb) bt
#0 0x4c5de180 in ?? () from /lib/ld-linux.so.3
#1 0x00000000 in ?? ()
(gdb)
(gdb) info register
r0 0xbefffe95 3204447893
r1 0x3 3
r2 0x4c5f6f18 1281322776
r3 0x4c5f6f1c 1281322780
r4 0x4c5f7058 1281323096
r5 0x4c5f6f18 1281322776
r6 0x1 1
r7 0x0 0
r8 0x8494 33940
r9 0x4c5f7960 1281325408
r10 0x4c5f757c 1281324412
r11 0xbefff9cc 3204446668
r12 0xffffffd0 4294967248
sp 0xbefff974 0xbefff974
lr 0x4c5d816c 1281196396
pc 0x4c5de180 0x4c5de180
cpsr 0x20000010 536870928
(gdb)
uClibc-0.9.33.0 is ok.
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "7-A"
Tag_CPU_arch: v7
Tag_CPU_arch_profile: Application
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-2
Tag_ABI_PCS_wchar_t: 4
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
Tag_ABI_FP_number_model: IEEE 754
Tag_ABI_align_needed: 8-byte
Tag_ABI_enum_size: int
Tag_CPU_unaligned_access: v6
Tag_DIV_use: Not allowed glibc-2.17 is not ok.
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "7-A"
Tag_CPU_arch: v7
Tag_CPU_arch_profile: Application
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-2
Tag_FP_arch: VFPv3
Tag_Advanced_SIMD_arch: NEONv1
Tag_ABI_PCS_wchar_t: 4
Tag_ABI_FP_rounding: Needed
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
Tag_ABI_FP_number_model: IEEE 754
Tag_ABI_align_needed: 8-byte
Tag_ABI_align_preserved: 8-byte, except leaf SP
Tag_ABI_enum_size: int
Tag_ABI_HardFP_use: SP and DP
Tag_CPU_unaligned_access: v6
I've got results as following, but I don't understand libc-2.18.so ELF architecture infomation.
All libraries except libc is not included VFP and NEON settings.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.