I am trying to run an application on an embedded target by using custom (newer version) dynamic linker/loader and libraries instead of default installed ones. But when i try to run a simple hello world application, I get seg fault
root@target:~# LD_DEBUG=all /home/root/libs/ld-2.12.1.so --library-path /home/root/libs/ ~/hello
2044: calling init: /home/root/libs/libc.so.6
2044:
Segmentation fault
root@target:~# gdb /home/root/libs/ld-2.12.1.so
GNU gdb (GDB) 7.8.1
Copyright (C) 2014 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".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/root/libs/ld-2.12.1.so...done.
(gdb) run --library-path /home/root/libs/ ~/hello
Starting program: /home/root/libs/ld-2.12.1.so --library-path /home/root/libs/ ~/hello
Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt
#0 0x00000000 in ?? ()
#1 0x2a00f0ec in call_init (env=<optimized out>, argv=<optimized out>, argc=<optimized out>, l=<optimized out>) at dl-init.c:85
#2 call_init (l=<optimized out>, argc=1, argv=0xbe988d04, env=0xbe988d0c) at dl-init.c:35
#3 0x2a00f1d4 in _dl_init (main_map=0x2a02d970, argc=1, argv=0xbe988d04, env=0xbe988d0c) at dl-init.c:134
#4 0x2a0007c4 in _dl_start_user () from /home/root/libs/ld-2.12.1.so
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
Any clue what i am doing wrong?
User contributions licensed under CC BY-SA 3.0