1 unstable release
0.2.1 | Nov 14, 2023 |
---|---|
0.2.0 |
|
0.1.0 |
|
#107 in #call
335KB
4K
SLoC
Contains (ELF exe/lib, 230KB) overlapping-segments-after-rounding, (ELF exe/lib, 170KB) patchelf/tests/short-first-segment.gz, (ELF lib, 67KB) libtest.so, (ELF exe/lib, 67KB) patchelf/tests/endianness/ppc64/main, (ELF lib, 67KB) libtest.so, (ELF exe/lib, 67KB) patchelf/tests/endianness/ppc64le/main and 23 more.
patchelf-rs
Rust FFI for patchelf that we can call patchelf directly in a dirty way.
[dependencies]
patchelf = "0.2.1"
Usage
- set soname
PatchElf::config()
.input("libpng.so")
.output("libpng2.so")
.set_soname("libpng2.so")
.patch();
- print soname
PatchElf::config()
.input("libz.so")
.print_soname()
.patch();
Seed doc for more usages.
lib.rs
:
Rust FFI for patchelf
Example for print soname.
PatchElf::config()
.input("libpng.so")
.print_soname()
.patch();
Example for set soname.
PatchElf::config()
.input("libpng.so")
.output("libpng2.so")
.set_soname("libpng2.so")
.patch();