Address concerns in pullrequests.

This commit is contained in:
Carlo Kok
2020-06-15 20:46:04 +02:00
parent 38531b8f42
commit 0b613caad1
6 changed files with 21 additions and 15 deletions

View File

@@ -211,10 +211,12 @@ impl Backend for FaerieBackend {
ref data_decls,
ref function_relocs,
ref data_relocs,
section: ref datasection,
ref custom_segment_section,
} = data_ctx.description();
assert!(datasection.is_none(), "Custom sections not supported");
if let Some((segment, section)) = custom_segment_section {
return Err(cranelift_module::ModuleError::Backend(anyhow::anyhow!("Custom section not supported by cranelift-faerie: `{}:{}`", segment, section)));
}
for &(offset, id) in function_relocs {
let to = &namespace.get_function_decl(&function_decls[id]).name;