Bug 733935

Summary: /lib/ld-linux.so.2 is too old, -static crashes
Product: [Fedora] Fedora Reporter: Jan Kratochvil <jan.kratochvil>
Component: arm-gp2x-linux-glibcAssignee: Hans de Goede <hdegoede>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 16CC: hdegoede
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-09 09:11:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Kratochvil 2011-08-28 18:44:20 UTC
Description of problem:
Tried to run Fedora x86_64 built binary on iron ARM but it crashes.

Version-Release number of selected component (if applicable):
arm-gp2x-linux-kernel-headers-2.6.12.0-5.fc15.noarch
arm-gp2x-linux-binutils-2.16.1-10.fc15.x86_64
arm-gp2x-linux-glibc-2.3.6-9.fc15.noarch
arm-gp2x-linux-gcc-4.1.2-12.fc15.x86_64

How reproducible:
Always.

Steps to Reproduce:
x86_64$ echo 'int main(void){return 0;}'|arm-gp2x-linux-gcc -Wall -x c -
x86_64$ scp a.out n900:.../rootfs-f13-beta3-2011-05-10/.../
n900$ ./a.out
+
x86_64$ echo 'int main(void){return 0;}'|arm-gp2x-linux-gcc -Wall -static -x c -
x86_64$ scp a.out n900:.../rootfs-f13-beta3-2011-05-10/.../
n900$ ./a.out
n900$ gdb ./a.out
(gdb) run
(gdb) bt

Actual results:
bash: /root/a.out: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
(Fedora 13 ARM is using /lib/ld-linux.so.3)
+
Segmentation fault
Program received signal SIGSEGV, Segmentation fault.
(gdb) bt
#0  0x0000c81c in sYSMALLOc (av=<optimized out>, nb=<optimized out>) at malloc.c:3095
#1  _int_malloc (av=0x76c68, bytes=<optimized out>) at malloc.c:4200
#2  0x0000db1c in __libc_malloc (bytes=16) at malloc.c:3334
#3  0x0000fe84 in __register_atfork (prepare=0xb3fc <ptmalloc_lock_all>, parent=0xa3ec <ptmalloc_unlock_all>, child=0xa0d0 <ptmalloc_unlock_all2>, dso_handle=0x0) at ../linuxthreads/sysdeps/unix/sysv/linux/register-atfork.c:38
#4  0x0000aae4 in ptmalloc_init () at arena.c:449
#5  0x0000e2a0 in malloc_hook_ini (sz=4294967258, caller=0x26) at hooks.c:39
#6  0x0000db1c in __libc_malloc (bytes=8) at malloc.c:3334
#7  0x000198c8 in _dl_init_paths (llp=0x0) at dl-load.c:647
#8  0x0001021c in _dl_non_dynamic_init () at dl-support.c:239
#9  0x000105a8 in init (argc=1, argv=0xbe855124, envp=0xbe85512c) at ../sysdeps/unix/sysv/linux/init-first.c:76
#10 0x000082d0 in __libc_start_main (main=0x821c <main>, argc=1, ubp_av=0xbe855124, init=0x8478 <__libc_csu_init>, fini=0x843c <__libc_csu_fini>, rtld_fini=0, stack_end=0x843c) at ../sysdeps/generic/libc-start.c:158
#11 0x000082d0 in __libc_start_main (main=0x821c <main>, argc=1, ubp_av=0xbe855124, init=0x8478 <__libc_csu_init>, fini=0x843c <__libc_csu_fini>, rtld_fini=0, stack_end=0x843c) at ../sysdeps/generic/libc-start.c:158
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Expected results:
working arm executable

Additional info:

Comment 1 Hans de Goede 2011-12-09 09:11:12 UTC
Thanks for the bug report and sorry for not noticing this bug report sooner.

The arm-gp2x-linux toolchain is only meant to built binaries for the GamePark gp2x handheld gameconsole: http://wiki.gp2x.org/wiki/GP2X

It is not a cross compiling toolchain for building binaries for Fedora arm on Fedora not-arm, AFAIK we do not have such a toolchain. All Fedora builds including the arm builds are done on native machines, no cross compiling is involved.