Merge remote-tracking branch 'origin/main' into windows-program-loading-scratchpad

This commit is contained in:
Folkert 2022-10-15 20:39:53 +02:00
commit c15ab0461a
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
369 changed files with 11559 additions and 5631 deletions

View file

@ -984,6 +984,20 @@ pub(crate) fn surgery_elf(
}
};
if app_obj
.sections()
.filter(|sec| {
let name = sec.name().unwrap_or_default();
!name.starts_with(".debug") && !name.starts_with(".eh")
})
.flat_map(|sec| sec.relocations())
.any(|(_, reloc)| reloc.kind() == RelocationKind::Absolute)
{
eprintln!("The surgical linker currently has issue #3609 and would fail linking your app.");
eprintln!("Please use `--linker=legacy` to avoid the issue for now.");
std::process::exit(1);
}
let total_start = Instant::now();
let loading_metadata_start = total_start;