崩溃日志内容:
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. 前端常见面试题总结part2

    今天总结了几道,感觉非常有意思的题,有感兴趣的可以看下,有疑问请留言~ (答案在最后) 考察自执行函数的this指向 审题要细心 var n = 2, obj = { n:2, fn:(functio ...

  2. MessagePack 新型序列化反序列化方案

    进入在学习redis的时候,在文中看到了关于MessagePack的简介,发现非常有意思,于是就花了点时间大致了解了下. MessagePack介绍: MessagePack is an effici ...

  3. 「LOJ10150」括号配对

    [题目] Hecy 又接了个新任务:BE 处理.BE 中有一类被称为 GBE. 以下是 GBE 的定义: 空表达式是 GBE 如果表达式 A 是 GBE,则 [A] 与 (A) 都是 GBE 如果 A ...

  4. 如何在linux下搭建svn服务

    • 安装svn 使用命令 yum install subversion 如果提示上述错误,请以管理员身份运行 使用命令su root 再执行 yum install subversion 2,查看sv ...

  5. java线程中断2

    一个线程在未正常结束之前, 被强制终止是很危险的事情. 因为它可能带来完全预料不到的严重后果. 所以你看到Thread.suspend, Thread.stop等方法都被Deprecated了.那么不 ...

  6. eclipse中server 没有tomcat选项

    eclipse集成Tomcat: 打开eclipse - 窗口 - 首选项 - 服务器 - 运行时环境 找到Tomcat然后添加. eclipse添加插件: 开发WEB项目时要集成Tomcat可以并不 ...

  7. Android App 开机启动画面和开机自动启动APP程序设置

    1.当前比较成熟一点的应用基本上都会在进入应用之显示一个启动界面 如腾讯微博 2.准备元素  需要开机启动的图片一张 3.新建Activity AlphaAnimation动画:控制对象alpha水平 ...

  8. 国内DNS服务器地址

    114DNS114.114.114.114114.114.115.115 腾讯119.29.29.29 百度180.76.76.76 阿里223.5.5.5223.6.6.6 [THE END]

  9. Python3爬虫----爬取网页内的图片

    无聊把公司内网爬了一遍. https://github.com/gig886/Python/tree/master/爬虫

  10. SLAM:ORB-SLAM 位姿优化描述

    只知道算法描述和代码,而不知道原理是比较扯的事情,还是把原理转载一下. 原文链接: http://www.cnblogs.com/luyb/p/5447497.html ORB-SLAM作为单目SLA ...