Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions profiling/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ thiserror = "2"
tracing = { version = "0.1", optional = true }
uuid = { version = "1.0", features = ["v4"] }

[target.'cfg(target_vendor = "apple")'.dependencies]
mach2 = "0.5" # version 0.6 requires edition="2024"

[dependencies.tracing-subscriber]
version = "0.3"
optional = true
Expand Down
7 changes: 1 addition & 6 deletions profiling/src/io/got.rs → profiling/src/io/got_elf64.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use super::GotSymbolOverwrite;
use crate::bindings::{
Elf64_Dyn, Elf64_Rela, Elf64_Sym, Elf64_Xword, DT_JMPREL, DT_NULL, DT_PLTRELSZ, DT_STRTAB,
DT_SYMTAB, PT_DYNAMIC, R_AARCH64_JUMP_SLOT, R_X86_64_JUMP_SLOT,
Expand All @@ -15,12 +16,6 @@ fn elf64_r_sym(info: Elf64_Xword) -> u32 {
(info >> 32) as u32
}

pub struct GotSymbolOverwrite {
pub symbol_name: &'static str,
pub new_func: *mut (),
pub orig_func: *mut *mut (),
}

/// Override the GOT entry for symbols specified in `overwrites`.
///
/// See: https://cs4401.walls.ninja/notes/lecture/basics_global_offset_table.html
Expand Down
Loading
Loading