windows linker name matching

This commit is contained in:
Luke Boswell 2023-09-03 21:20:10 +10:00 committed by Folkert
parent 1856695b0b
commit 8123041d0a
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C

View file

@ -1107,11 +1107,15 @@ impl<'a> AppSections<'a> {
for (i, section) in file.sections().enumerate() { for (i, section) in file.sections().enumerate() {
let kind = match section.name() { let kind = match section.name() {
Ok(".text") => SectionKind::Text, Ok(name) => {
// Ok(".data") => SectionKind::Data, match name {
Ok(".rdata") => SectionKind::ReadOnlyData, _ if name.starts_with(".text") => SectionKind::Text,
// _ if name.starts_with(".data") => SectionKind::Data,
_ => continue, _ if name.starts_with(".rdata") => SectionKind::ReadOnlyData,
_ => continue,
}
},
Err(_) => continue,
}; };
let mut relocations: MutMap<String, Vec<AppRelocation>> = MutMap::default(); let mut relocations: MutMap<String, Vec<AppRelocation>> = MutMap::default();