qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Makefile] Compiling Qemu to dynamic library


From: Peter Maydell
Subject: Re: [Qemu-devel] [Makefile] Compiling Qemu to dynamic library
Date: Thu, 8 Jan 2015 10:39:01 +0000

On 8 January 2015 at 04:02, Halsey Pian <address@hidden> wrote:
> ./stubs/slirp.c:void slirp_pollfds_fill(GArray *pollfds, uint32_t *timeout)
>
> ./main-loop.c:    slirp_pollfds_fill(gpollfds, &timeout);

> Do you know when qemustub should be used? libqemustub.a is only used for
> qemu-img, qemu-nbd, qemu-io, but not for qemu-system-x86_64(and other
> platform binary)?

No, the stub library is always linked. We rely on the linker's
behaviour of only pulling a .o file out of the .a archive if
it is needed to satisfy a symbol dependency not provided by one
of the other .o files in the link. So if the program we're
building provides an implementation of the function (in this
example, if the binary links main-loop.c) then we will use
that. If the program being built doesn't provide an implementation
then we'll use the stub implementation.

-- PMM



reply via email to

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