Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patching hard-coded paths within the text segment. #555

Open
liarokapisv opened this issue May 22, 2024 · 0 comments
Open

Patching hard-coded paths within the text segment. #555

liarokapisv opened this issue May 22, 2024 · 0 comments

Comments

@liarokapisv
Copy link

liarokapisv commented May 22, 2024

It is often the case that closed-source binaries hard-code paths to global FHS locations. Currently, patchelf works for the very common case of ELF dependencies through shared linking but doesn't do much for other hard-coded paths like manual configuration lookup and even hard-coded dlopen calls.

It could perhaps be useful to be able to provide a "hard-coded path map" that would replace hard-coded paths from the text segment as well. This could allow changing such paths to relative-paths and then symlink the dependencies to the packaged nix packages directly.
This is much more flexible than wrapping executables using buildFHSEnv since it should work for MacOS as well (for which bwrap does not work) and would be leaner than running through namespacing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant