qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 03/18] modules: add qemu-modinfo utility


From: Paolo Bonzini
Subject: Re: [PATCH v2 03/18] modules: add qemu-modinfo utility
Date: Mon, 14 Jun 2021 16:36:33 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1

On 14/06/21 10:34, Paolo Bonzini wrote:
- modinfo.json needs to be disabled on non-ELF platforms (x86, Windows).  One alternative is to use libbfd instead of including an ELF parser.

- If modinfo.json has to be installed, you need to build modinfo for the build machine in order to support cross compiling.  That however would require a cross libbfd, which is a pain.  Do you really need to install it?  Can the functionality instead be included in the main QEMU binary with a query-modules command or something like that.

Another possibility to eschew .o parsing is to add something like this to the sources

#ifdef QEMU_MODINFO
#define MODULE_METADATA(key, value) \
   =<>= MODINFO key value
#else
#define MODULE_METADATA(key, value)
#endif

MODULE_METADATA("opts", "spice")

A Python script could parse compile_commands.json, add -E -DQEMU_MODINFO to the command-line option, and look in the output for the metadata.

Paolo



reply via email to

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