Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/os_hacks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ fn setup_nixos_patchelf(kani_dir: &Path) -> Result<()> {
// Prevents clippy error.
let target = "x86_64-unknown-linux-gnu";
assert!(env!("TARGET") == target);
if Path::new("/lib64/ld-linux-x86-64.so.2").exists() {
// if the expected path exists, I guess things are fine?
if let Ok(linker) = Path::new("/lib64/ld-linux-x86-64.so.2").canonicalize()
&& linker.exists()
&& !linker.to_string_lossy().contains("-stub-ld-")
{
// looks like a valid linker, I guess things are fine?
return Ok(());
}

Expand Down