diff --git a/Makefile b/Makefile index a41d2e6c3..00746ea65 100644 --- a/Makefile +++ b/Makefile @@ -55,10 +55,10 @@ bench: cargo bench $(compiler_features) build-wasmer: - cargo build --release --manifest-path lib/cli/Cargo.toml $(compiler_features) + RUSTFLAGS="-C link-args=-Wl,-dynamic-list,$(pwd)/lib/engine-native/native.syms" cargo build --release --manifest-path lib/cli/Cargo.toml $(compiler_features) build-wasmer-debug: - cargo build --manifest-path lib/cli/Cargo.toml $(compiler_features) + RUSTFLAGS="-C link-args=-Wl,-dynamic-list,$(pwd)/lib/engine-native/native.syms" cargo build --manifest-path lib/cli/Cargo.toml $(compiler_features) WAPM_VERSION = v0.5.0 build-wapm: diff --git a/lib/compiler-llvm/src/object_file.rs b/lib/compiler-llvm/src/object_file.rs index 0ce8e1093..f8d304305 100644 --- a/lib/compiler-llvm/src/object_file.rs +++ b/lib/compiler-llvm/src/object_file.rs @@ -54,7 +54,7 @@ where { // TODO: use perfect hash function? let mut libcalls = HashMap::new(); - libcalls.insert("vm.exception.trap".to_string(), LibCall::RaiseTrap); + libcalls.insert("wasmer_raise_trap".to_string(), LibCall::RaiseTrap); libcalls.insert("truncf".to_string(), LibCall::TruncF32); libcalls.insert("trunc".to_string(), LibCall::TruncF64); libcalls.insert("ceilf".to_string(), LibCall::CeilF32); @@ -63,7 +63,7 @@ where libcalls.insert("floor".to_string(), LibCall::FloorF64); libcalls.insert("nearbyintf".to_string(), LibCall::NearestF32); libcalls.insert("nearbyint".to_string(), LibCall::NearestF64); - libcalls.insert("vm.probestack".to_string(), LibCall::Probestack); + libcalls.insert("wasmer_probestack".to_string(), LibCall::Probestack); let elf = goblin::elf::Elf::parse(&contents).map_err(map_goblin_err)?; let get_section_name = |section: &goblin::elf::section_header::SectionHeader| { diff --git a/lib/compiler-llvm/src/translator/intrinsics.rs b/lib/compiler-llvm/src/translator/intrinsics.rs index d3d0a9c5f..57fac3b52 100644 --- a/lib/compiler-llvm/src/translator/intrinsics.rs +++ b/lib/compiler-llvm/src/translator/intrinsics.rs @@ -370,7 +370,7 @@ impl<'ctx> Intrinsics<'ctx> { ), readonly: context .create_enum_attribute(Attribute::get_named_enum_kind_id("readonly"), 0), - stack_probe: context.create_string_attribute("probe-stack", "vm.probestack"), + stack_probe: context.create_string_attribute("probe-stack", "wasmer_probestack"), void_ty, i1_ty, @@ -440,7 +440,7 @@ impl<'ctx> Intrinsics<'ctx> { // VM intrinsics. throw_trap: module.add_function( - "vm.exception.trap", + "wasmer_raise_trap", void_ty.fn_type(&[i32_ty_basic], false), None, ),