qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 0/7] build-sys: Fix iscsi module loading fail


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v2 0/7] build-sys: Fix iscsi module loading failure
Date: Fri, 22 Aug 2014 14:35:19 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Fri, Aug 22, 2014 at 06:54:16PM +0800, Fam Zheng wrote:
> The iscsi driver doesn't work if built with --enable-modules:
> 
> $ ~/build/last/qemu-img
> Failed to open module: /home/fam/build/master/block-iscsi.so: undefined 
> symbol: qmp_query_uuid
> qemu-img: Not enough arguments
> Try 'qemu-img --help' for more information
> 
> This fixes it by completely linking libqemuutil.a (now qemuutil.o) rather than
> on demand.
> 
> A few stub functions are added into libqemustub to make linker happy.
> 
> Lastly, iqn generation code is moved from iscsi.c to util, so that
> qmp_query_uuid or its stub is not missed.

Did you try ld --just-symbols=filename to include module symbol
dependencies when linking the QEMU binary?

The advantage is that the QEMU binary stays smaller.  And (depending on
whether you consider this a feature or not) it discourages people from
building out-of-tree modules.

Did you compare the before/after binary size with your patch?  Please
use size(1).

It's unfortunate to bloat the binary, not just from a code size
perspective, but also from a security perspective less code is better
(cannot be abused in return-oriented-programming).

Stefan

Attachment: pgpLCX3kmUjg_.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]