崩溃日志内容:
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. Elasticsearch创建mapping

    (put)请求方式 http://192.168.1.200:9200/index_mapping body 参数 { "mappings":{ "properties& ...

  2. Java时间戳获取

    Java时间戳获取方式: 1:New Date().getTime(); 2: System.currentTimeMillis();区别: New Date().getTime()的底层其实是Sys ...

  3. 【PHP】函数

    一.      数学中的函数: a)    sin().cos().tan().log() 这些都是数学函数,但是都已经忘了啥意思了!没关系,在php当中的函数和这些函数的概念还是有一定的区别的 二. ...

  4. 使用Cloudflare增强网站

    Cloudflare Cloudflare是美国的一家网络性能和安全公司,近期由于自己域名HTTP证书到期,了解到了Cloudflare,用到了它提供的CDN以及SSL 如何设置CDN 登入Cloud ...

  5. python工业互联网监控项目实战2—OPC

    OPC(OLE for Process Control)定义:指为了给工业控制系统应用程序之间的通信建立一个接口标准,在工业控制设备与控制软件之间建立统一的数据存取规范.它给工业控制领域提供了一种标准 ...

  6. Flask 入门(十三)

    上文提到的Blueprint和厉害吧? 可是有个缺点,就是,还不够框架,因为一个功能不可能就一个文件啊?多文件怎么解决? 还和上文项目架构一样 1.新建两个目录,admin,function 2.ad ...

  7. Spring XML Bean 定义的加载和注册

    前言 本篇文章主要介绍 Spring IoC 容器怎么加载 bean 的定义元信息. 下图是一个大致的流程图: 第一次画图,画的有点烂.

  8. Array(数组)对象-->概念和创建

    1.什么是数组? 数组对象是使用单独的变量名来存储一系列的值. 2.数组创建的三种方法: 方法1:常规方式 var arr=new Array(); arr[0]="lisa"; ...

  9. 学习《深入应用c++11》1

    C++11 让程序更简洁.更优雅 可调用对象 是一个函数指针 是一个具有operator()成员函数的类对象(仿函数) 是一个可被装换为函数指针的类对象 是一个类的成员(函数)指针 void func ...

  10. matplotlib locators

    2020-03-23 17:59:59 -- Edit by yangray The Locator class is the base class for all tick locators. Th ...