Git Product home page Git Product logo

Comments (4)

dezgeg avatar dezgeg commented on July 21, 2024 1

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 Xs 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.

shlevy avatar shlevy commented on July 21, 2024

Please open a new issue if someone wants to pursue this.

from patchelf.

solna86 avatar solna86 commented on July 21, 2024

@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.

probonopd avatar probonopd commented on July 21, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.