From a089cf5a0c65671a2ce9989121d06e21b6f52974 Mon Sep 17 00:00:00 2001 From: Mark McCaskey Date: Wed, 26 Feb 2020 17:59:11 -0800 Subject: [PATCH] Link GDB JIT exposed global and fn as "linkonce" This is required because LLVM exposes its own --- lib/runtime-core/src/jit_debug.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/runtime-core/src/jit_debug.rs b/lib/runtime-core/src/jit_debug.rs index a25fc5f8048..45a620cae1b 100644 --- a/lib/runtime-core/src/jit_debug.rs +++ b/lib/runtime-core/src/jit_debug.rs @@ -15,6 +15,7 @@ use std::sync::{Arc, Mutex}; // Implementation of this function is derived from wasmtime and is licensed under // the Apache 2.0 license. See ATTRIBUTIONS.md for full license and more // information. +#[linkage = "linkonce"] #[no_mangle] #[inline(never)] extern "C" fn __jit_debug_register_code() { @@ -80,6 +81,7 @@ struct JitDebugDescriptor { /// The data is in the form of a doubly linked list. This global variable acts /// as a head node with extra information about the operation that we want the /// debugger to perform. +#[linkage = "linkonce"] #[no_mangle] #[allow(non_upper_case_globals)] static mut __jit_debug_descriptor: JitDebugDescriptor = JitDebugDescriptor {