Skip to contentSkip to conversation

modules: turn off lazy binding

PATCH New Gerd Hoffmann 1 participant 1 message Oct 28, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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).

---
 util/module.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
util/module.c +1 -1
index 503c399421c5..c65060c167df 100644
@@ -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;
     }
Signature · 1 line
2.27.0