2

Our product contains multiple source packages. Some of the source packages are built using autotool/conf.

Based on what google said of switching to clang as a default compiler for the NDK starting with NDK-13, we went ahead with the switch in the *.mk files as well as in our env setup and build scripts. No make files where changed.

We were using NDK-10d which is old, so we switched to NDK-12b. We also generated a standalone toolchain from it, as recommended by Android's documentation, to simplify our build scripts and standardize across all.

The issue I am facing is the crash on launch as soon as the native code is loaded. What I have noticed is a warning in logcat regarding: unused DT entry: type 0x6ffffffe (VERNEED) and 0x6fffffff (VERNEEDNUM).

Then, the dreaded: A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x30 in tid 22246.

The stack trace tells me very, very little:

08-11 15:31:02.421 128-128/? I/DEBUG:     #00 pc 00036b8c  /system/lib/libc.so
08-11 15:31:02.421 128-128/? I/DEBUG:     #01 pc 0003817b  /system/lib/libc.so (vfprintf+18)
08-11 15:31:02.421 128-128/? I/DEBUG:     #02 pc 00035251  /system/lib/libc.so (fprintf+12)
08-11 15:31:02.421 128-128/? I/DEBUG:     #03 pc 000015fd  /data/app/com.myapp.demo-1/lib/arm/libappdebug.so (pipe_listen+328)
08-11 15:31:02.421 128-128/? I/DEBUG:     #04 pc 0001659b  /system/lib/libc.so
08-11 15:31:02.421 128-128/? I/DEBUG:     #05 pc 000144c3  /system/lib/libc.so

Notice that comparing the data within the ELFs as dumped by readelf -d shows the absence of those 2 DT entries in the binaries generated by arm-linux-androideabi-gcc-4.9 builds.

Any ideas, pointers, ...anything at all ..., would be much appreciated cuz i have been stuck for (blush) 3 days now.

Thanks.

not2qubit
  • 14,531
  • 8
  • 95
  • 135
user3342339
  • 349
  • 1
  • 5
  • 19
  • It would have helped if you had shown the difference of output from `readelf -d` for the two versions... – not2qubit Feb 03 '17 at 22:59

1 Answers1

0

You need to look into the problem of your unused DT entry. If you're using your library to pipe stuff somewhere else, that warning will appear at every run and endanger your pipe to receive garbage, or your app to receive excpetions. Please have a look at my post here.

Community
  • 1
  • 1
not2qubit
  • 14,531
  • 8
  • 95
  • 135