From: Stefan Hajnoczi <stefanha@gmail.com>
To: Catalin Vasile <catalinvasile92@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] qemu sources and makefile system
Date: Wed, 7 Jan 2015 13:02:59 +0000 [thread overview]
Message-ID: <20150107130259.GD18014@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <CAOMf8tpPfdNUUFXV7mXmsAU9pgvKrkKy_K96uB4xKXOfdC98dQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1816 bytes --]
On Tue, Jan 06, 2015 at 11:44:34AM +0200, Catalin Vasile wrote:
> I'm new to qemu-devel and I'm trying to add a ".c" source to qemu.
> To be more specific, I'm trying to add a file into <qemu src>/hw/virtio/.
> I've added "common-obj-y += virtio-src.o" to the Makefile.objs in that
> folder
> and when I'm compiling qemu it seems to compile the sources, but I don't
> know
> if they are added to the qemu binary.
> Is there anything else left to do in order for qemu build system to include
> my source file?
You could look at the link map to see which object files are included by the linker:
1. Run make V=1 to see the final gcc command-line.
2. Copy the command-line and append -Xlinker -Map=output.map
3. Now look at the output.map file
Or look at the symbol table in the binary:
$ readelf -s x86_64-softmmu/qemu-system-x86_64 | grep virtio-
740: 0000000000000000 0 FILE LOCAL DEFAULT ABS virtio-blk.c
791: 0000000000000000 0 FILE LOCAL DEFAULT ABS virtio-blk.c
799: 0000000000000000 0 FILE LOCAL DEFAULT ABS virtio-serial-bus.c
1158: 0000000000000000 0 FILE LOCAL DEFAULT ABS virtio-net.c
1262: 0000000000000000 0 FILE LOCAL DEFAULT ABS virtio-scsi.c
1329: 0000000000000000 0 FILE LOCAL DEFAULT ABS virtio-scsi-dataplane.c
1554: 0000000000000000 0 FILE LOCAL DEFAULT ABS virtio-balloon.c
4884: 0000000000000000 0 FILE LOCAL DEFAULT ABS virtio-console.c
9308: 0000000000000000 0 FILE LOCAL DEFAULT ABS virtio-rng.c
9333: 0000000000000000 0 FILE LOCAL DEFAULT ABS virtio-pci.c
9453: 0000000000000000 0 FILE LOCAL DEFAULT ABS virtio-bus.c
9476: 0000000000000000 0 FILE LOCAL DEFAULT ABS virtio-mmio.c
If you need help, please post a git URL so we can see your code.
Stefan
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-01-07 13:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-06 9:44 [Qemu-devel] qemu sources and makefile system Catalin Vasile
2015-01-07 13:02 ` Stefan Hajnoczi [this message]
2015-01-09 8:02 ` Vasile Catalin-B50542
-- strict thread matches above, loose matches on Subject: below --
2015-01-06 12:25 Vasile Catalin-B50542
2015-01-06 19:45 ` Paolo Bonzini
2015-01-06 9:41 Catalin Vasile
2015-01-06 9:21 Vasile Catalin-B50542
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150107130259.GD18014@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=catalinvasile92@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.