From: Yacine HEBBAL Subject: Link kvm with Xed library: Unknown symbol error Date: Thu, 5 Nov 2015 16:34:05 +0000 (UTC) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Return-path: Received: from plane.gmane.org ([80.91.229.3]:57222 "EHLO plane.gmane.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1033254AbbKEQeT (ORCPT ); Thu, 5 Nov 2015 11:34:19 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZuNUO-0003gb-5f for kvm@vger.kernel.org; Thu, 05 Nov 2015 17:34:16 +0100 Received: from machine107.orange-labs.com ([161.106.0.5]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 05 Nov 2015 17:34:16 +0100 Received: from y_hebbal by machine107.orange-labs.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 05 Nov 2015 17:34:16 +0100 Sender: kvm-owner@vger.kernel.org List-ID: Hi, I'm a student working on a monitoring application on top of KVM in which I need to disassemble some VM instructions from the hypervisor level. To do so (disassemble instructions), I want to use Xed library from the code I added to KVM. The problem is that Xed library comes with header files and a static library file. When I compile kvm-kmod with Xed (with some changes in the Kbuild file to include Xed). I get the following input: compilation OK with some warnings: WARNING: "xed_encode_order_limit" [/home/yacine/vmi/kvm-kmod/x86/kvm-intel] is COMMON symbol .... // omitted WARNING: "xed_chip_features2" [/home/yacine/vmi/kvm-kmod/x86/kvm-intel] is COMMON symbol WARNING: "stderr" [/home/yacine/vmi/kvm-kmod/x86/kvm-intel.ko] undefined! WARNING: "fprintf" [/home/yacine/vmi/kvm-kmod/x86/kvm-intel.ko] undefined! WARNING: "abort" [/home/yacine/vmi/kvm-kmod/x86/kvm-intel.ko] undefined! WARNING: "__umoddi3" [/home/yacine/vmi/kvm-kmod/x86/kvm-intel.ko] undefined! insmod: error inserting 'kvm-intel.ko': -1 Invalid module format when running dmesg: [17591.101368] kvm_intel: please compile with -fno-common ... // omitted [17591.101527] kvm_intel: Unknown symbol __umoddi3 (err 0) [17591.101553] kvm_intel: Unknown symbol abort (err 0) ... // omitted [17591.101763] kvm_intel: please compile with -fno-common If anyone has an idea how to solve this, I would be very grateful :)