-
Notifications
You must be signed in to change notification settings - Fork 13
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
Why is the dynamic linker explicitly overridden? #3
Comments
Yes, I just tried omitting those lines on my VM but then I get the error:
which from a quick google search happens from wrong linking. |
Okay, so if I understand correctly, it doesn't work on your machine without explicitly passing
There is not such a place, sorry. NixOS does a lot of weird tricks (like not having a standard dynamic linker) for reproducibility reasons. I guess then it's best just to either
Thanks for your quick reply. Just for the sake of curiosity: what does |
It seems like thats the default linker which doesn't work. Yes I might add an -Xlinker flag in the future which could be quite helpful for this sort of stuff. |
wrecc/src/main.rs
Lines 152 to 153 in 37a8413
This explicitly sets the dynamic linker to a fixed value.
This could fail in a few ways:
/lib64/ld-linux-x86-64.so.1
(unlikely)/lib64/ld-linux-x86-64.so.2
-> like NixOS (which is a linux distribution!), and of course BSDs (if you want to support them in the future).I did a few tests and it looks like LD has its own logic for resolving a dynamic linker.
man 1 ld
also warns against setting your own dynamic linker, saying "The default dynamic linker is normally correct".By removing these lines, the executables generated by wrecc could run unpatched on NixOS.
The text was updated successfully, but these errors were encountered: