崩溃日志内容:
java.lang.UnsatisfiedLinkError: dlopen failed: empty/missing DT_HASH in "libxxxx.so" (built with --hash-style=gnu?)
 at java.lang.Runtime.loadLibrary(Runtime.java:371)
 at java.lang.System.loadLibrary(System.java:989)

崩溃设备信息:
{
    "STARTTIME": "1970-01-01 08:00:00",
    "CRASHTIME": "2015-08-14 01:47:28",
    "DEVICEID": "6aa3a6d0cbcb3251",
    "DEVICE": "hlte",
    "FINGERPRINT": "samsung/h3gduosctc/hlte:5.0/LRX21V/N9009KEU2GOF1:user/release-keys",
    "MODEL": "SM-N9009",
    "OSVERSION": "5.0",
    "CPU_ABI": "armeabi-v7a",
    "IMEI": "A00000443A46BD",
    "CPU_ABI2": "armeabi",
……
}

解决方式:
http://stackoverflow.com/questions/28638809/android-ndk-unsatisfiedlinkerror-dlopen-failed-empty-missing-dt-hash

The library you are trying to load was most likely built with Wl,hash-style=gnu. This was not supported on Android until recently (afaik this isn't even in L). You need to build your libraries with -Wl,-hash-style=sysv.

How did you build cpplibrary.so? If you didn't do anything to manually switch to the gnu hash style, it could be a bug in the NDK.

One option is to add "LOCAL_LDFLAGS := -Wl,--hash-style=sysv" at screenrecord Android.mk though I am sure there is a less hacky method of doing so..

总结了一下是须要在Android.mk中加入链接选项:
LOCAL_LDFLAGS := Wl,-hash-style=sysv
libsysv-hash-table-library_ldflags := Wl,-hash-style=sysv

于是在改动前后查看了一下so节的变化:

readelf.exe -d libxxxx.so

Dynamic section at offset 0xed14 contains 27 entries:
Tag Type Name/Value
0x00000003 (PLTGOT) 0xfee0
0x00000002 (PLTRELSZ) 552 (bytes)
0x00000017 (JMPREL) 0x46fc
0x00000014 (PLTREL) REL
0x00000011 (REL) 0x39c4
0x00000012 (RELSZ) 3384 (bytes)
0x00000013 (RELENT) 8 (bytes)
0x6ffffffa (RELCOUNT) 420
0x00000006 (SYMTAB) 0x148
0x0000000b (SYMENT) 16 (bytes)
0x00000005 (STRTAB) 0x1918
0x0000000a (STRSZ) 5780 (bytes)
0x00000004 (HASH) 0x2fac
0x00000001 (NEEDED) Shared library: [liblog.so]
0x00000001 (NEEDED) Shared library: [libdl.so]
0x00000001 (NEEDED) Shared library: [libstdc++.so]
0x00000001 (NEEDED) Shared library: [libm.so]
0x00000001 (NEEDED) Shared library: [libc.so]
0x0000000e (SONAME) Library soname: [libbugrpt.so]
0x0000001a (FINI_ARRAY) 0xf590
0x0000001c (FINI_ARRAYSZ) 8 (bytes)
0x00000019 (INIT_ARRAY) 0xf598
0x0000001b (INIT_ARRAYSZ) 16 (bytes)
0x00000010 (SYMBOLIC) 0x0
0x0000001e (FLAGS) SYMBOLIC BIND_NOW
0x6ffffffb (FLAGS_1) Flags: NOW
0x00000000 (NULL) 0x0

readelf.exe -d libxxxx.so
Dynamic section at offset 0xed14 contains 27 entries:
Tag Type Name/Value
0x00000003 (PLTGOT) 0xfee0
0x00000002 (PLTRELSZ) 552 (bytes)
0x00000017 (JMPREL) 0x46fc
0x00000014 (PLTREL) REL
0x00000011 (REL) 0x39c4
0x00000012 (RELSZ) 3384 (bytes)
0x00000013 (RELENT) 8 (bytes)
0x6ffffffa (RELCOUNT) 420
0x00000006 (SYMTAB) 0x148
0x0000000b (SYMENT) 16 (bytes)
0x00000005 (STRTAB) 0x1918
0x0000000a (STRSZ) 5780 (bytes)
0x00000004 (HASH) 0x2fac
0x00000001 (NEEDED) Shared library: [liblog.so]
0x00000001 (NEEDED) Shared library: [libdl.so]
0x00000001 (NEEDED) Shared library: [libstdc++.so]
0x00000001 (NEEDED) Shared library: [libm.so]
0x00000001 (NEEDED) Shared library: [libc.so]
0x0000000e (SONAME) Library soname: [libbugrpt.so]
0x0000001a (FINI_ARRAY) 0xf590
0x0000001c (FINI_ARRAYSZ) 8 (bytes)
0x00000019 (INIT_ARRAY) 0xf598
0x0000001b (INIT_ARRAYSZ) 16 (bytes)
0x00000010 (SYMBOLIC) 0x0
0x0000001e (FLAGS) SYMBOLIC BIND_NOW
0x6ffffffb (FLAGS_1) Flags: NOW
0x00000000 (NULL) 0x0

改动前后的节并没有什么变化。然并卵啊!



dlopen failed: empty/missing DT_HASH in "libx.so" (built with --hash-style=gnu?)的更多相关文章

  1. dlopen failed: empty/missing DT_HASH in "libx.so" (built with --hash-style=gnu?)

    崩溃日志内容: java.lang.UnsatisfiedLinkError: dlopen failed: empty/missing DT_HASH in "libxxxx.so&quo ...

  2. gerrit代码审核工具之“error unpack failed error Missing unknown”错误解决思路

    使用gerrit代码审核工具时遇到error: unpack failed: error Missing unknown d6d7c89bd1d77f44c5c8e99437aaffbfc0684e7 ...

  3. java.lang.UnsatisfiedLinkError:dlopen failed: “**/*/arm/*.so” has unexpected e_machine: 3

    转载请标明出处,维权必究:https://www.cnblogs.com/tangZH/p/10458448.html 今天在做APP的时候使用so库,可结果一加载so库的时候便发生了这个莫名其妙的错 ...

  4. Git review :error: unpack failed: error Missing tree

    环境 git version 1.9.1 Gerrit Code Review (2.11.3) 1 2 现象 修改后调用 git review可以提交到Gerrit上,然后只要一用 git comm ...

  5. error: unpack failed: error Missing tree

    最近新建一个仓库,push时遇到如下问题,试了好多方法,最后在stackoverflow上找到解决办法了,可是在开始时就试过这方法,但不成.至于为嘛出现的这种错误,还是不明白原因. git.exe p ...

  6. so加载报错:dlopen failed: couldn't map ... Permission denied

    转自:https://blog.csdn.net/u013270444/article/details/60869376 问题描述: 我的应用当中集成了一个安全相关的sdk,而这个sdk中使用的so是 ...

  7. [转]NDK编译库运行时报dlopen failed: cannot locate symbol "__exidx_end" 解决办法

    原文链接:http://blog.csdn.net/acm2008/article/details/41040015 当用NDK编译的库在运行加载时报如下错: dlopen("/data/d ...

  8. 分析Android :java.lang.UnsatisfiedLinkError: dlopen failed * is 32-bit instead of 64-bit

    Crash 日志: java.lang.UnsatisfiedLinkError: dlopen failed: "/data/data/com.ireader.plug.sdk/iread ...

  9. gradle方式集成融云sdk dlopen failed: library "libsqlite.so" not found

    1.gradle implementation 'cn.rongcloud.android:IMLib:2.8.6' implementation 'cn.rongcloud.android:IMKi ...

随机推荐

  1. 八、【Docker笔记】使用Dockerfile创建镜像

    在前面我们讲解了基于已有的镜像容器创建和基于本地模板导入两种方式来创建镜像,在这里我们就来说说第三种创建镜像的方式.Dockerfile是一个文本格式的配置文件,我们可以通过Dockerfile快速创 ...

  2. 34.2 字节流 InputStreamReader OutputStreamWriter

    使用方法同字符流,不一样的是数据类型是字节 copydemo public static void main(String[] args) throws IOException { InputStre ...

  3. 教你爬取腾讯课堂、网易云课堂、mooc等所有课程信息

    本文的所有代码都在GitHub上托管,想要代码的同学请点击这里

  4. Xray安装与使用

    0×00 Xray简介 xray是从长亭洞鉴核心引擎中提取出的社区版漏洞扫描神器,支持主动.被动多种扫描方式,自备盲打平台.可以灵活定义 POC,功能丰富,调用简单,支持 Windows / macO ...

  5. python从零开始基础入门——开发环境搭建:Visual Studio Code

    前言 文的文字及图片来源于网络,仅供学习.交流使用,不具有任何商业用途,版权归原作者所有,如有问题请及时联系我们以作处理. 作者:山海皆可平z PS:如有需要Python学习资料的小伙伴可以加点击下方 ...

  6. Bug Bash in Personal Photo Experience 1/11/2016

    In the process of our Personal Photo Experience Project, There are some bugs which hinder our forwar ...

  7. I - Fill The Bag codeforces 1303D

    题解:注意这里的数组a中的元素,全部都是2的整数幂.然后有二进制可以拼成任意数.只要一堆2的整数幂的和大于x,x也是2的整数幂,那么那一堆2的整数幂一定可以组成x. 思路:位运算,对每一位,如果该位置 ...

  8. B - Raising Modulo Numbers

    People are different. Some secretly read magazines full of interesting girls' pictures, others creat ...

  9. E - Aladdin and the Flying Carpet

    It's said that Aladdin had to solve seven mysteries before getting the Magical Lamp which summons a ...

  10. Python函数的返回值和作用域

    函数的返回值和作用域 1.返回值 def guess(x):    if x > 3:        return "> 3"    else:        retu ...