Hi, David,
Thank you for your advice. Your suggestion works. I can catch the
crash point. The TLS doesn't work. I enabled the TLS in android, the
system can boot up.
I will investigate the difference between linux kernel 2.6.35 and
3.0.
With the same android images, kernel 2.6.35 can boot up android but
failed 3.0. After enable TLS in android, kernel 3.0 can boot up. So
there should be some TLS change in kernel.
(gdb) run
Starting program: /system/bin/sh
init: untracked pid 188 exited
BFD: /system/bin/linker: warning: sh_link not set for section
`.ARM.exidx'
BFD: /system/bin/linker: warning: sh_link not set for section
`.ARM.exidx'
Program received signal SIGSEGV, Segmentation fault.
__libc_preinit () at bionic/libc/bionic/libc_init_dynamic.c:73
73 bionic/libc/bionic/libc_init_dynamic.c: No such file or directory.
in bionic/libc/bionic/libc_init_dynamic.c
(gdb) bt
#0 __libc_preinit () at bionic/libc/bionic/libc_init_dynamic.c:73
#1 0xb0003820 in call_array (ctor=0xafd40004, count=<value optimized
out>,
reverse=0) at bionic/linker/linker.c:1615
#2 0xb0003a94 in call_constructors (si=0xb000cae8)
at bionic/linker/linker.c:1645
#3 0xb0006856 in __dl_$t (si=0xb000cae8, wr_offset=<value optimized
out>)
at bionic/linker/linker.c:2039
#4 0xb00069d2 in init_library (si=0xb000cae8) at bionic/linker/
linker.c:1189
#5 0xb0005e52 in find_library (name=0x8ec5 "libc.so")
at bionic/linker/linker.c:1232
#6 0xb00066d0 in __dl_$t (si=0xb000c9d0, wr_offset=<value optimized
out>)
at bionic/linker/linker.c:1958
#7 0xb0006cdc in __linker_init (elfdata=<value optimized out>)
at bionic/linker/linker.c:2216
#8 0xb000100c in __dl__start () at bionic/linker/arch/arm/begin.S:37
#9 0xb000100c in __dl__start () at bionic/linker/arch/arm/begin.S:37
Backtrace stopped: previous frame identical to this frame (corrupt
stack?)
(gdb) ^A
On Aug 25, 2:19 am, David Turner <
di...@android.com> wrote:
> It's the function that calls a shared-library or executable list of
> constructor functions.
>
> It is likely a constructor crashing. Unfortunately, the shared library's
> mapping is not available to gdb until after the constructors have run
> It's a know bug, you could try changing the lines in linker.c that read
> like:
>
> call_constructors(si);
> notify_gdb_of_load(si);
>
> and change them to:
>
> notify_gdb_of_load(si);
> call_constructors(si);
>
> However, I don't guarantee that this will work. Let me know if this helps
> though.
>