linker/macho: include Mach-O specific reloc scanning for libc symbols

This commit is contained in:
Jakub Konka 2024-12-30 23:02:30 +01:00
parent c4c9869a15
commit dfbd0f0c66
No known key found for this signature in database
GPG key ID: 3AEF55DD984C8344

View file

@ -1359,6 +1359,19 @@ fn surgery_macho_help(
RelocationKind::Got => {
println!("\t\tTODO synthesise __got entry for {name}")
}
RelocationKind::MachO { value, relative: _ } => match value {
macho::ARM64_RELOC_GOT_LOAD_PAGE21
| macho::ARM64_RELOC_GOT_LOAD_PAGEOFF12 => {
println!("\t\tTODO synthesise __got entry for {name}")
}
macho::ARM64_RELOC_BRANCH26 => {
println!("\t\tTODO synthesise __stub entry for {name}")
}
_ => internal_error!(
"Invalid relocation for libc symbol, {:+x?}: {name}",
rel
),
},
_ => internal_error!(
"Invalid relocation for libc symbol, {:+x?}: {name}",
rel