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

Improvement: just set rpath on repair everytime #459

Open
fzakaria opened this issue Sep 27, 2023 · 2 comments
Open

Improvement: just set rpath on repair everytime #459

fzakaria opened this issue Sep 27, 2023 · 2 comments

Comments

@fzakaria
Copy link

Please let me know if you all appreciate these code improvements as I scan the code.

I am reading the code for repair.py and I believe it would be simpler to always just squash the RUNPATH/RPATH [1]

I see a few other improvements that can be made. Happy to upstream some if you find them useful.

[1]

patcher.set_rpath(dest_path, dest_dir)

@auvipy
Copy link
Contributor

auvipy commented Oct 2, 2023

can you share some context and example test case please?

@fzakaria
Copy link
Author

fzakaria commented Oct 2, 2023

There isn't a testcase per-say -- this is a code simplification suggestion.
The code I linked sets the RPATH only if it is already set on the binary and does a series of control-flow logic.

My suggestion/idea: why not just stamp the RPATH every time regardless? It is safe to have the RPATH point to the destination directory every time.

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

2 participants