title: Android C++ application crashes in linking to shared library stage
body: <p>I have a hello world C++ application that links with many 3rdpart and home-made libraries. It crashes immediately when trying to load it, with Segmentation Fault.
  The same code, with the same dependencies, all compiled for Linux - runs successfully.</p>
  
  <p>How can I start to debug it?<br>
  What could be the reason?</p>
  
  <p>Edit: This is what logcat prints:</p>
  
  <pre><code>F/libc    ( 8129): Fatal signal 11 (SIGSEGV), code 128, fault addr 0x0 in tid 8129 (HelloWorldApp) I/DEBUG   ( 2876): *** *** *** *** *** ***
  *** *** *** *** *** *** *** *** *** *** I/DEBUG   ( 2876): Build fingerprint: 'Intel/cht_hr/cht_hr:5.1.1/LMY47Z/LS0000037:userdebug/test-keys' I/DEBUG   ( 2876): Revision: '0' W/NativeCrashListener( 3194): Couldn't find ProcessRecord for pid 8129 I/DEBUG   ( 2876): ABI: 'x86' I/DEBUG   ( 2876): pid: 8129, tid: 8129, name: HelloWorldApp  &gt;&gt;&gt; ./StaticImageOR &lt;&lt;&lt; E/DEBUG   ( 2876): AM write failure (32 / Broken pipe) I/DEBUG   ( 2876): signal 11 (SIGSEGV), code 128 (SI_KERNEL), fault addr 0x0 I/DEBUG   ( 2876):     eax ff84cadc  ebx f32b7c6c  ecx 00000010  edx 00000000 I/DEBUG   ( 2876):     esi f32c6610  edi 00000000 I/DEBUG   ( 2876):     xcs 00000023  xds 0000002b  xes 0000002b  xfs 00000000  xss 0000002b I/DEBUG   ( 2876):     eip f2600cfb  ebp ff84c6dc  esp ff84c5f4  flags 00010246 I/DEBUG   ( 2876):  I/DEBUG   ( 2876): backtrace: I/DEBUG   ( 2876):     #00 pc 0062fcfb  /system/lib/libcommander.so I/DEBUG   ( 2876):     #01 pc 0017651f  /system/lib/libcommander.so I/DEBUG   ( 2876):     #02 pc 00001fcb  /system/bin/linker (__dl__ZN6soinfo16CallConstructorsEv.part.23+1275) I/DEBUG   ( 2876): 
  #03 pc 00001c26  /system/bin/linker (__dl__ZN6soinfo16CallConstructorsEv.part.23+342) I/DEBUG   ( 2876):  
  #04 pc 00001c26  /system/bin/linker (__dl__ZN6soinfo16CallConstructorsEv.part.23+342) I/DEBUG   ( 2876):  
  #05 pc 00008706  /system/bin/linker (__dl___linker_init+4998) I/DEBUG   ( 2876):     #06 pc 00009e0e  /system/bin/linker (__dl__start+30) I/DEBUG   ( 2876):  I/DEBUG   ( 2876): Tombstone written to: /data/tombstones/tombstone_02
  </code></pre>
  
  <p>So I undersatnd the problem is in libcommander loading.<br>
  How to continue with this?</p>
  
  <p>Thanks!</p>