[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
pgpLCX3kmUjg_.pgp
Description: PGP signature
- [Qemu-devel] [PATCH v2 0/7] build-sys: Fix iscsi module loading failure, Fam Zheng, 2014/08/22
- [Qemu-devel] [PATCH v2 1/7] build-sys: Move fifo8.c to hw/misc, Fam Zheng, 2014/08/22
- [Qemu-devel] [PATCH v2 2/7] configure: Add -lutil to libs_qga if necessary, Fam Zheng, 2014/08/22
- [Qemu-devel] [PATCH v2 3/7] stubs: Add iohandler.c, Fam Zheng, 2014/08/22
- [Qemu-devel] [PATCH v2 4/7] stubs: Merge set-fd-handler.c into iohandler.c, Fam Zheng, 2014/08/22
- [Qemu-devel] [PATCH v2 6/7] build-sys: Change libqemuutil.a to qemuutil.o and link whole object, Fam Zheng, 2014/08/22
- [Qemu-devel] [PATCH v2 5/7] util: Move throttle.c out to top level, Fam Zheng, 2014/08/22
- [Qemu-devel] [PATCH v2 7/7] iscsi: Move iqn generation code to util, Fam Zheng, 2014/08/22
- Re: [Qemu-devel] [PATCH v2 0/7] build-sys: Fix iscsi module loading failure,
Stefan Hajnoczi <=