LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This 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


Reply
  Search this Thread
Old 02-25-2014, 02:54 AM   #1
uathebest
LQ Newbie
 
Registered: Jan 2009
Posts: 3

Rep: Reputation: 0
I received SIGILL signal when a ELF file execute on Cortex-A9 board.


- machine : Cortex-A9 (armv7-a)

*# cat /proc/cpuinfo
Processor : ARMv7 Processor rev 0 (v7l)
processor : 0
BogoMIPS : 1993.93

processor : 1
BogoMIPS : 1993.93

Features : swp half thumb fastmult edsp tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x3
CPU part : 0xc09
CPU revision : 0
- kernel: Linux SWITCH 3.6.5 #68 SMP Fri Feb 21 18:56:30 KST 2014 armv7l GNU/Linux
- toolchain binaries: ELDK-5.4(armv7a) - http://www.denx.de/wiki/ELDK-5/WebHome

$ ./arm-linux-gnueabi-gcc -v
Using built-in specs.
COLLECT_GCC=./arm-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/opt/eldk-5.4/armv7a/sysroots/i686-eldk-linux/usr/libexec/armv7a-vfp-neon-linux-gnueabi/gcc/arm-linux-gnueabi/4.7.2/lto-wrapper
Target: arm-linux-gnueabi
Configured with: /opt/eldk/build/eldk-rel-v5.4-2013-08-02-9a46fd5-armv7a/tmp/work-shared/gcc-4.7.2-r20/gcc-4.7.2/configure --build=x86_64-linux --host=i686-eldk-linux --target=arm-linux-gnueabi --prefix=/opt/eldk-5.4/armv7a/sysroots/i686-eldk-linux/usr --exec_prefix=/opt/eldk-5.4/armv7a/sysroots/i686-eldk-linux/usr --bindir=/opt/eldk-5.4/armv7a/sysroots/i686-eldk-linux/usr/bin/armv7a-vfp-neon-linux-gnueabi --sbindir=/opt/eldk-5.4/armv7a/sysroots/i686-eldk-linux/usr/bin/armv7a-vfp-neon-linux-gnueabi --libexecdir=/opt/eldk-5.4/armv7a/sysroots/i686-eldk-linux/usr/libexec/armv7a-vfp-neon-linux-gnueabi --datadir=/opt/eldk-5.4/armv7a/sysroots/i686-eldk-linux/usr/share --sysconfdir=/opt/eldk-5.4/armv7a/sysroots/i686-eldk-linux/etc --sharedstatedir=/opt/eldk-5.4/armv7a/sysroots/i686-eldk-linux/com --localstatedir=/opt/eldk-5.4/armv7a/sysroots/i686-eldk-linux/var --libdir=/opt/eldk-5.4/armv7a/sysroots/i686-eldk-linux/usr/lib/armv7a-vfp-neon-linux-gnueabi --includedir=/opt/eldk-5.4/armv7a/sysroots/i686-eldk-linux/usr/include --oldincludedir=/opt/eldk-5.4/armv7a/sysroots/i686-eldk-linux/usr/include --infodir=/opt/eldk-5.4/armv7a/sysroots/i686-eldk-linux/usr/share/info --mandir=/opt/eldk-5.4/armv7a/sysroots/i686-eldk-linux/usr/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/opt/eldk/build/eldk-rel-v5.4-2013-08-02-9a46fd5-armv7a/tmp/sysroots/i686-nativesdk-eldk-linux --with-gnu-ld --enable-shared --enable-languages=c,c++ --enable-threads=posix --disable-multilib --enable-c99 --enable-long-long --enable-symvers=gnu --enable-libstdcxx-pch --program-prefix=arm-linux-gnueabi- --without-local-prefix --enable-target-optspace --enable-lto --enable-libssp --disable-bootstrap --disable-libmudflap --with-system-zlib --with-linker-hash-style=gnu --enable-linker-build-id --with-ppl=no --with-cloog=no --enable-checking=release --enable-cheaders=c_global --with-gxx-include-dir=/opt/eldk-5.4/armv7a/sysroots/armv7a-vfp-neon-linux-gnueabi/usr/include/c++ --with-build-time-tools=/opt/eldk/build/eldk-rel-v5.4-2013-08-02-9a46fd5-armv7a/tmp/sysroots/x86_64-linux/usr/arm-linux-gnueabi/bin --with-sysroot=/opt/eldk-5.4/armv7a/sysroots/armv7a-vfp-neon-linux-gnueabi --with-build-sysroot=/opt/eldk/build/eldk-rel-v5.4-2013-08-02-9a46fd5-armv7a/tmp/sysroots/generic-armv7a --disable-libunwind-exceptions --disable-libssp --disable-libgomp --disable-libmudflap --with-mpfr=/opt/eldk/build/eldk-rel-v5.4-2013-08-02-9a46fd5-armv7a/tmp/sysroots/i686-nativesdk-eldk-linux --with-mpc=/opt/eldk/build/eldk-rel-v5.4-2013-08-02-9a46fd5-armv7a/tmp/sysroots/i686-nativesdk-eldk-linux --enable-nls
Thread model: posix
gcc version 4.7.2 (GCC)
- compile options:
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 found similar symptoms on web sites the following:
https://bugzilla.redhat.com/show_bug.cgi?id=985342

I'll try to compile ELDK-5.5 sources building without NEON feature.

Last edited by uathebest; 03-03-2014 at 07:30 PM.
 
Old 03-03-2014, 03:55 AM   #2
uathebest
LQ Newbie
 
Registered: Jan 2009
Posts: 3

Original Poster
Rep: Reputation: 0
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.

What more should I check?

eglibc/libc configure log:
./configure --build=i686-linux --host=arm-linux-gnueabi --target=arm-linux-gnueabi --prefix=/usr --exec_prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib/eglibc --datadir=/usr/share --sysconfdir=/etc --sharedstatedir=/com --localstatedir=/var --libdir=/usr/lib --includedir=/usr/include --oldincludedir=/usr/include --infodir=/usr/share/info --mandir=/usr/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/opt/eldk-5.5/armv7a-softfloat/sysroots/generic-armv7a --enable-kernel=2.6.16 --without-cvs --disable-profile --disable-debug --without-gd --enable-clocale=gnu --enable-add-ons --with-headers=/opt/eldk-5.5/armv7a-softfloat/sysroots/generic-armv7a/usr/include --without-selinux --enable-obsolete-rpc --with-kconfig=/opt/eldk-5.5/armv7a-softfloat/sysroots/i686-linux/usr/bin --without-fp

$ readelf -A sysroot-destdir/lib/ld-2.18.so
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_rounding: Needed
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
Tag_ABI_FP_number_model: IEEE 754
Tag_ABI_align8_needed: Yes
Tag_ABI_align8_preserved: Yes, except leaf SP
Tag_ABI_enum_size: int
Tag_ABI_optimization_goals: Aggressive Speed
Tag_CPU_unaligned_access: v6


$ readelf -A sysroot-destdir/lib/libc-2.18.so
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_VFP_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_align8_needed: Yes
Tag_ABI_enum_size: int
Tag_CPU_unaligned_access: v6

$

Last edited by uathebest; 03-03-2014 at 04:40 PM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Remote Debugging for ARM - signal SIGILL chrisARM Linux - Embedded & Single-board computer 3 09-03-2013 09:56 AM
Starting with Embedded Linux on a Cortex-M3 board cphus Linux - Embedded & Single-board computer 4 07-15-2012 08:56 AM
Program received signal SIGTRAP, Trace/breakpoint trap while testing the arm elf chanducnu Programming 0 01-03-2012 05:19 AM
LXer: Cortex-A8 dev board takes on the BeagleBoard-xM LXer Syndicated Linux News 0 11-18-2011 09:10 AM
problem with NXP LPC1758 ARM Cortex-M3 Board Linux_bird Linux - Newbie 1 10-09-2009 09:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 07:17 AM.

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
Open Source Consulting | Domain Registration