From: Gerd Hoffmann Date: Wed, 28 Oct 2020 05:49:44 +0000 (+0100) Subject: modules: turn off lazy binding X-Git-Tag: v5.2.0-rc0~13^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=546323bdac18984c771ebefae1046ee61742f9ca;p=thirdparty%2Fqemu.git modules: turn off lazy binding We want missing symbols fail module load right away instead of having qemu abort later on in case lazy binding fails. Can happen -- for example -- when trying to load a module for a pci device (virtio-gpu-pci) into a qemu without pci support (qemu-system-avr). Signed-off-by: Gerd Hoffmann Message-id: 20201028054944.5772-1-kraxel@redhat.com --- diff --git a/util/module.c b/util/module.c index 503c399421c..c65060c167d 100644 --- a/util/module.c +++ b/util/module.c @@ -132,7 +132,7 @@ static int module_load_file(const char *fname, bool mayfail, bool export_symbols assert(QTAILQ_EMPTY(&dso_init_list)); - flags = G_MODULE_BIND_LAZY; + flags = 0; if (!export_symbols) { flags |= G_MODULE_BIND_LOCAL; }