Skip to content

Commit 8d724d8

Browse files
fix(profiling): skip ld-musl dynamic linker when hooking ELF GOT
1 parent 5078e6d commit 8d724d8

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

profiling/src/io/got_elf64.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,9 @@ pub unsafe extern "C" fn callback(
239239
std::str::from_utf8(image_name).unwrap_or("[Unknown]")
240240
};
241241

242-
// I guess if we try to hook into GOT from `linux-vdso` or `ld-linux` our best outcome will be
243-
// that nothing happens, but most likely we'll crash and we should avoid that.
244-
if name.contains("linux-vdso") || name.contains("ld-linux") {
242+
// I guess if we try to hook into GOT from `linux-vdso`, `ld-linux` or `ld-musl` our best
243+
// outcome will be that nothing happens, but most likely we'll crash and we should avoid that.
244+
if name.contains("linux-vdso") || name.contains("ld-linux") || name.contains("ld-musl") {
245245
return 0;
246246
}
247247

0 commit comments

Comments
 (0)