wasmerio/wasmer · error
relocations to offset in the same function are not yet suppo
Error message
relocations to offset in the same function are not yet supported
What it means
Error "relocations to offset in the same function are not yet supported" thrown in wasmerio/wasmer.
Source
Thrown at lib/compiler-cranelift/src/compiler.rs:804
)
}
}
fn mach_reloc_to_reloc(
module: &ModuleInfo,
func_index_map: &cranelift_entity::PrimaryMap<ir::UserExternalNameRef, ir::UserExternalName>,
reloc: &FinalizedMachReloc,
) -> Relocation {
let FinalizedMachReloc {
offset,
kind,
addend,
target,
} = &reloc;
let name = match target {
FinalizedRelocTarget::ExternalName(external_name) => external_name,
FinalizedRelocTarget::Func(_) => {
unimplemented!("relocations to offset in the same function are not yet supported")
}
};
let reloc_target: RelocationTarget = if let ExternalName::User(extname_ref) = name {
let func_index = func_index_map[*extname_ref].index;
//debug_assert_eq!(namespace, 0);
RelocationTarget::LocalFunc(
module
.local_func_index(FunctionIndex::from_u32(func_index))
.expect("The provided function should be local"),
)
} else if let ExternalName::LibCall(libcall) = name {
RelocationTarget::LibCall(irlibcall_to_libcall(*libcall))
} else {
panic!("unrecognized external target")
};
Relocation {
kind: irreloc_to_relocationkind(*kind),
reloc_target,View on GitHub (pinned to 8c4b9ee9d3)
When it happens
Trigger: Thrown at lib/compiler-cranelift/src/compiler.rs:804 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of wasmerio/wasmer@8c4b9ee9d3 (2026-09-01).
Data as JSON: /api/errors/01bc9514b269ae0e.
Report an issue: GitHub.