From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40226) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHqSw-00027q-C2 for qemu-devel@nongnu.org; Fri, 06 Sep 2013 03:28:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHqSr-0008Tv-Ic for qemu-devel@nongnu.org; Fri, 06 Sep 2013 03:28:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:64525) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHqSr-0008To-9v for qemu-devel@nongnu.org; Fri, 06 Sep 2013 03:28:21 -0400 From: Fam Zheng Date: Fri, 6 Sep 2013 15:28:05 +0800 Message-Id: <1378452491-20467-1-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [RFC PATCH v2 0/6] Shared Library Module Support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, famz@redhat.com, mjt@tls.msk.ru, stefanha@redhat.com, pbonzini@redhat.com, vilanova@ac.upc.edu, rth@twiddle.net This series implements feature of shared object building as described in: http://wiki.qemu.org/Features/Modules It's achieved in three steps, with extra bonus to change curl and qed to = a shared library module in the end (only to demonstrate the usage, no "make install" support of .so files yet). v2: 1. Allow per object cflags and libs: [01/06] make.rule: fix $(obj) to a real relative path Slightly changed, added $(obj-base) to work with module depen= dency variable expansion. [02/06] rule.mak: allow per object cflags and libs 2. Rules for building .so: [03/06] Makefile: introduce common-obj-m and block-obj-m for DSO [Richard] Change some rule generation and don't use "ln -r" t= o for intermediate object. 3. Code to load module. All .so files are scanned and loaded when program starts: [04/06] module: implement module loading function [mjt] Don't load all .so unconditionally, subsystem call module_load for specific type. [Llu=C3=ADs] Used configure time prefix as the module base di= rectory. 4. curl and qed adoption: [05/06] curl: build as shared library [06/06] qed: build as shared library Added to demostrate how to write multi-file module. Fam Zheng (6): make.rule: fix $(obj) to a real relative path rule.mak: allow per object cflags and libs Makefile: introduce common-obj-m and block-obj-m for DSO module: implement module loading function curl: build as shared library qed: build as shared library Makefile | 32 ++++++++++++++++++++++++++++--- Makefile.objs | 14 +++++++++++++- Makefile.target | 3 ++- block.c | 1 + block/Makefile.objs | 7 ++++--- bsd-user/main.c | 3 +++ configure | 28 +++++++++++++++------------ include/qemu/module.h | 9 +++++++++ linux-user/main.c | 3 +++ qemu-img.c | 1 + rules.mak | 25 +++++++++++++++++++------ scripts/create_config | 4 ++++ ui/console.c | 1 + util/Makefile.objs | 2 ++ util/module.c | 52 +++++++++++++++++++++++++++++++++++++++++++++= ++++++ vl.c | 2 ++ 16 files changed, 161 insertions(+), 26 deletions(-) --=20 1.8.3.1