Comments (4)
Huh, interesting. The binary has an import for a symbol named lib
:
228: 0000000000000000 0 OBJECT GLOBAL DEFAULT UND lib
and the DT_RUNPATH
entry value ends in lib
:
[/nix/store/gflcr9v02x8248p061jpjyfrbzxmhsn9-strongswan-5.5.2/lib/ipsec:/nix/store/gflcr9v02x8248p061jpjyfrbzxmhsn9-strongswan-5.5.2/lib64:/nix/store/gflcr9v02x8248p061jpjyfrbzxmhsn9-strongswan-5.5.2/lib:/nix/store/w0djd8vbmjxkwdd8vi7xiy16cymlxh4c-gcc-5.4.0/libexec/gcc/x86_64-unknown-linux-gnu/5.4.0:/nix/store/izxnyg94352qxa4a4783dzgnpy5cwazj-glibc-2.25/lib:/nix/store/ayyq8sq4hf4psmk4jqj5jyfskd7fa1xx-gcc-5.4.0-lib/lib]
So I think the linker decided to save some space by pointing the lib
symbol table entry to the last 3 bytes of the string in DT_RUNPATH
! Then, when we shrink the RPATH we overwrite the old RPATH with X
s and thus the imported symbol name gets mangled as well.
I suppose that instead of overwriting the entire RPATH with X, we only remove the hash parts (like nuke-refs
does) in the old RPATH.
from patchelf.
Please open a new issue if someone wants to pursue this.
from patchelf.
@shlevy Any idea if this issue has been fixed?
I had to migrate all my development setup because some R packages cannot be built.
Another user reports the same issue here: https://discourse.nixos.org/t/shared-object-error-in-rpackages-seurat/211
from patchelf.
I can confirm that patchelf 0.10 cripples ELFs with XXXXX
. patchelf 0.9 did not suffer from this. So maybe a bisect is needed to find out which commit exactly broke this.
from patchelf.
Related Issues (20)
- Test regression in 0.18.0: repeated-updates.sh, replace-add-needed.sh HOT 5
- patchelf breaks dylibs from recent Firefox Nightly builds HOT 11
- repeated-updates.sh fails on mips64el HOT 1
- What versions support redhat6
- `patchelf --set-interpreter` and `patchelf --set-rpath` depend on the order (at least on i686-linux) HOT 3
- Allow --rename-dynamic-symbols to change the version tag.
- Regression in 0.18.0: --set-rpath creates broken header alignment HOT 3
- `patchefd --set-rpath ... nodejs` broken since ~0.17.2 (0.15.0 works) HOT 3
- when I use zsh plugins zsh-autosuggestions, it something wrong HOT 1
- Program header editing features HOT 5
- SEGV when ELF has a malformed .dynamic section
- Relocatable binaries not handled
- Patchelf 0.18.0 Build failure on s390x with "span : out of range error"
- build failed for NetBSD
- rename-dynamic-symbols produces unusable binary
- Need help for cross-compliling libc.so.6 HOT 1
- patchelf: cannot normalize PT_NOTE segment: non-contiguous SHT_NOTE sections HOT 1
- _arguments:463: command not found: dynamic HOT 6
- `replace-needed.sh` test fails on 32-bit arm
- [RISCV] Error on 'make check' - relocation truncated to fit: R_RISCV_RVC_LUI against `__TMC_LIST__'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from patchelf.