|
.arg("-dynamic-linker") |
|
.arg("/lib64/ld-linux-x86-64.so.2") |
This explicitly sets the dynamic linker to a fixed value.
This could fail in a few ways:
- the system only has
/lib64/ld-linux-x86-64.so.1 (unlikely)
- the system doesn't have
/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.
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 ldalso 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.