Created
July 13, 2018 03:58
-
-
Save lingol/88ddda603a3cc420db7d9daf023b9958 to your computer and use it in GitHub Desktop.
How to edit dynamic library's dynamic-entry-library name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to edit dynamic library's dynamic-entry-library name. | |
Using LIEF lib (https://github.com/lief-project/LIEF). | |
GUOLING-MC4:~/Desktop$ pip install setuptools --upgrade | |
GUOLING-MC4:~/Desktop$ pip install lief 130 | |
GUOLING-MC4:~/Desktop$ python | |
Python 2.7.15 (default, May 1 2018, 16:44:08) | |
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import lief | |
>>> lib = lief.parse('libmmkv_x86.so') | |
>>> cpp = lib.get_library('libc++_shared.so') | |
>>> cpp.name = 'libc++_shared_x86.so' | |
>>> lib.write('libmmkv_x86.so') | |
>>> exit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://lief-project.github.io/doc/latest/api/python/elf.html#lief.ELF.Binary.get_library