zoukankan      html  css  js  c++  java
  • Android7.0后JNI库必须保留Section Headers

    此修改在官网的描述如下:

    Each ELF file has additional information contained in the section headers. These headers must be present now, because the dynamic linker uses them for sanity checking. Some developers try to strip them in an attempt to obfuscate the binary and prevent reverse engineering. (This doesn’t really help because it is possible to reconstruct the stripped information using widely-available tools.)

    $ readelf --header libBroken.so | grep 'section headers'
      Start of section headers:          0 (bytes into file)
      Size of section headers:           0 (bytes)
      Number of section headers:         0
    $
    

    Resolution: remove the extra steps from your build that strip section headers.

    理解:

    1.ELF文件,必须要保留 section headers,Android7.0后dynamic linker会对这个字段做检查

    2.一些app开发者之前去掉section headers的目的是为了混淆或保护,其实效果不大

    3.修复方法是在编译JNI库时去掉strip section headers步骤

  • 相关阅读:
    LINUX
    DOCKER
    计算牛的数目
    计算a^3=b^3+c^3+d^3
    用递归计算C(m,n)
    A Mathematical Curiosity
    Who is lier?
    我的第一篇 实习报告
    R.java
    天气系统
  • 原文地址:https://www.cnblogs.com/jason207489550/p/6669899.html
Copyright © 2011-2022 走看看