Stream: git-wasmtime

Topic: wasmtime / issue #2976 Lower Arm64Call relocations in cra...


view this post on Zulip Wasmtime GitHub notifications bot (Jun 10 2021 at 11:02):

bjorn3 commented on issue #2976:

The mini_core_hello_world example runs with this PR in combination with the following patch:

<details>

diff --git a/example/mini_core.rs b/example/mini_core.rs
index c4834c80..aeec532d 100644
--- a/example/mini_core.rs
+++ b/example/mini_core.rs
@@ -285,9 +285,11 @@ fn ne(&self, other: &u64) -> bool {
 }

 impl PartialEq for u128 {
+    #[inline]
     fn eq(&self, other: &u128) -> bool {
         (*self) == (*other)
     }
+    #[inline]
     fn ne(&self, other: &u128) -> bool {
         (*self) != (*other)
     }
@@ -620,11 +622,3 @@ struct PanicLocation {
     column: u32,
 }

-#[no_mangle]
-#[cfg(not(windows))]
-pub fn get_tls() -> u8 {
-    #[thread_local]
-    static A: u8 = 42;
-
-    A
-}
diff --git a/example/mini_core_hello_world.rs b/example/mini_core_hello_world.rs
index 6570f2bf..895f6a2e 100644
--- a/example/mini_core_hello_world.rs
+++ b/example/mini_core_hello_world.rs
@@ -287,37 +287,12 @@ struct ExternTypeWrapper {
     assert_eq!(repeat[0], Some(42));
     assert_eq!(repeat[1], Some(42));

-    from_decimal_string();
-
-    #[cfg(not(any(jit, windows)))]
-    test_tls();
-
-    #[cfg(all(not(jit), target_os = "linux"))]
-    unsafe {
-        global_asm_test();
-    }
-
     // Both statics have a reference that points to the same anonymous allocation.
     static REF1: &u8 = &42;
     static REF2: &u8 = REF1;
     assert_eq!(*REF1, *REF2);
 }

-#[cfg(all(not(jit), target_os = "linux"))]
-extern "C" {
-    fn global_asm_test();
-}
-
-#[cfg(all(not(jit), target_os = "linux"))]
-global_asm! {
-    "
-    .global global_asm_test
-    global_asm_test:
-    // comment that would normally be removed by LLVM
-    ret
-    "
-}
-
 #[repr(C)]
 enum c_void {
     _1,
diff --git a/src/lib.rs b/src/lib.rs
index cfc5902c..c154fde3 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -288,7 +288,7 @@ fn build_isa(sess: &Session, backend_config: &BackendConfig) -> Box<dyn isa::Tar
                 cranelift_codegen::isa::lookup_variant(target_triple, variant).unwrap();
             // Don't use "haswell" as the default, as it implies `has_lzcnt`.
             // macOS CI is still at Ivy Bridge EP, so `lzcnt` is interpreted as `bsr`.
-            builder.enable("nehalem").unwrap();
+            //builder.enable("nehalem").unwrap();
             builder
         }
     };

</details>

view this post on Zulip Wasmtime GitHub notifications bot (Jun 10 2021 at 17:15):

cfallin commented on issue #2976:

CI failures are curious -- the particular relocation enum value seems to be missing in some builds. Old pinned version, or Cargo feature dependency maybe?

view this post on Zulip Wasmtime GitHub notifications bot (Jun 10 2021 at 17:21):

bjorn3 commented on issue #2976:

The CI failure is because gimli-rs/object#322 needs to be merged first.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 10 2021 at 17:23):

cfallin commented on issue #2976:

Ah, sorry, missed that it was still pending. Thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Jun 12 2021 at 10:38):

bjorn3 commented on issue #2976:

Object released a new version with the change. CI passed.


Last updated: Dec 23 2024 at 12:05 UTC