Skip to content

Commit d8969b0

Browse files
committed
Ignore __imp_ names when searching for symbols
1 parent d162154 commit d8969b0

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/tools/run-make-support/src/symbols.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@ pub fn any_symbol_contains(path: impl AsRef<Path>, substrings: &[&str]) -> bool
2828
with_symbol_iter(path, |syms| {
2929
for sym in syms {
3030
for substring in substrings {
31-
if sym
32-
.name_bytes()
33-
.unwrap()
34-
.windows(substring.len())
35-
.any(|x| x == substring.as_bytes())
36-
{
31+
let name = sym.name_bytes().unwrap();
32+
if name.starts_with(b"__imp_") {
33+
continue;
34+
}
35+
if name.windows(substring.len()).any(|x| x == substring.as_bytes()) {
3736
eprintln!("{:?} contains {}", sym, substring);
3837
return true;
3938
}

0 commit comments

Comments
 (0)