Skip to content

Commit

Permalink
Ignore __imp_ names when searching for symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisDenton committed Aug 8, 2024
1 parent d162154 commit d8969b0
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/tools/run-make-support/src/symbols.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@ pub fn any_symbol_contains(path: impl AsRef<Path>, substrings: &[&str]) -> bool
with_symbol_iter(path, |syms| {
for sym in syms {
for substring in substrings {
if sym
.name_bytes()
.unwrap()
.windows(substring.len())
.any(|x| x == substring.as_bytes())
{
let name = sym.name_bytes().unwrap();
if name.starts_with(b"__imp_") {
continue;
}
if name.windows(substring.len()).any(|x| x == substring.as_bytes()) {
eprintln!("{:?} contains {}", sym, substring);
return true;
}
Expand Down

0 comments on commit d8969b0

Please sign in to comment.