We should prevent inlining of symbols from the driver .so files that are
mocked, as well as those in the main libvirt.so
This isn't fixing any currently known problem, just trying to prevent
future issues.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
scripts/mock-noinline.py | 2 +-
src/libxl/libxl_capabilities.h | 2 +-
src/qemu/qemu_command.h | 4 ++--
src/qemu/qemu_hotplug.h | 2 +-
src/qemu/qemu_interface.h | 2 +-
src/qemu/qemu_monitor.h | 2 +-
src/qemu/qemu_monitor_json.h | 2 +-
src/qemu/qemu_process.h | 4 ++--
8 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/scripts/mock-noinline.py b/scripts/mock-noinline.py
index a8b7680c11..69cf0b4b99 100644
--- a/scripts/mock-noinline.py
+++ b/scripts/mock-noinline.py
@@ -59,7 +59,7 @@ def scan_overrides(filename):
m = re.search(r'''^\w+\s*(?:\*\s*)?(\w+)\(''',
line)
if m is not None:
name = m.group(1)
- if name.startswith("vir"):
+ if name.startswith("vir") or name.startswith("qemu")
or name.startswith("libxl"):
mocked[name] = "%s:%d" % (filename, lineno)
diff --git a/src/libxl/libxl_capabilities.h b/src/libxl/libxl_capabilities.h
index 9efb836429..4e8e2bb59b 100644
--- a/src/libxl/libxl_capabilities.h
+++ b/src/libxl/libxl_capabilities.h
@@ -39,7 +39,7 @@
* by libvirt for Xen, and cannot be used for a persistent network name. */
#define LIBXL_GENERATED_PREFIX_XEN "vif"
-bool libxlCapsHasPVUSB(void);
+bool libxlCapsHasPVUSB(void) G_GNUC_NO_INLINE;
virCapsPtr
libxlMakeCapabilities(libxl_ctx *ctx);
diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h
index b579817b44..89d99b111f 100644
--- a/src/qemu/qemu_command.h
+++ b/src/qemu/qemu_command.h
@@ -82,7 +82,7 @@ int qemuBuildTLSx509BackendProps(const char *tlspath,
/* Open a UNIX socket for chardev FD passing */
int
-qemuOpenChrChardevUNIXSocket(const virDomainChrSourceDef *dev);
+qemuOpenChrChardevUNIXSocket(const virDomainChrSourceDef *dev) G_GNUC_NO_INLINE;
/* Generate '-device' string for chardev device */
int
@@ -254,4 +254,4 @@ qemuBuildTPMOpenBackendFDs(const char *tpmdev,
int *tpmfd,
int *cancelfd)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
- ATTRIBUTE_NONNULL(4);
+ ATTRIBUTE_NONNULL(4) G_GNUC_NO_INLINE;
diff --git a/src/qemu/qemu_hotplug.h b/src/qemu/qemu_hotplug.h
index 4a49e04a15..6287c5b5e8 100644
--- a/src/qemu/qemu_hotplug.h
+++ b/src/qemu/qemu_hotplug.h
@@ -151,7 +151,7 @@ int qemuDomainSetVcpuInternal(virQEMUDriverPtr driver,
virBitmapPtr vcpus,
bool state);
-unsigned long long qemuDomainGetUnplugTimeout(virDomainObjPtr vm);
+unsigned long long qemuDomainGetUnplugTimeout(virDomainObjPtr vm) G_GNUC_NO_INLINE;
int qemuHotplugAttachDBusVMState(virQEMUDriverPtr driver,
virDomainObjPtr vm,
diff --git a/src/qemu/qemu_interface.h b/src/qemu/qemu_interface.h
index 0464b903d7..3dcefc6a12 100644
--- a/src/qemu/qemu_interface.h
+++ b/src/qemu/qemu_interface.h
@@ -54,7 +54,7 @@ int qemuInterfaceBridgeConnect(virDomainDefPtr def,
int qemuInterfaceOpenVhostNet(virDomainDefPtr def,
virDomainNetDefPtr net,
int *vhostfd,
- size_t *vhostfdSize);
+ size_t *vhostfdSize) G_GNUC_NO_INLINE;
qemuSlirpPtr qemuInterfacePrepareSlirp(virQEMUDriverPtr driver,
virDomainNetDefPtr net);
diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
index 1c1b0c9b89..d20a15c202 100644
--- a/src/qemu/qemu_monitor.h
+++ b/src/qemu/qemu_monitor.h
@@ -408,7 +408,7 @@ int qemuMonitorSetLink(qemuMonitorPtr mon,
/* These APIs are for use by the internal Text/JSON monitor impl code only */
char *qemuMonitorNextCommandID(qemuMonitorPtr mon);
int qemuMonitorSend(qemuMonitorPtr mon,
- qemuMonitorMessagePtr msg);
+ qemuMonitorMessagePtr msg) G_GNUC_NO_INLINE;
virJSONValuePtr qemuMonitorGetOptions(qemuMonitorPtr mon)
ATTRIBUTE_NONNULL(1);
void qemuMonitorSetOptions(qemuMonitorPtr mon, virJSONValuePtr options)
diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h
index 84fea25983..098ab857be 100644
--- a/src/qemu/qemu_monitor_json.h
+++ b/src/qemu/qemu_monitor_json.h
@@ -30,7 +30,7 @@
int qemuMonitorJSONIOProcessLine(qemuMonitorPtr mon,
const char *line,
- qemuMonitorMessagePtr msg);
+ qemuMonitorMessagePtr msg) G_GNUC_NO_INLINE;
int qemuMonitorJSONIOProcess(qemuMonitorPtr mon,
const char *data,
diff --git a/src/qemu/qemu_process.h b/src/qemu/qemu_process.h
index 125508f9fe..dbd989c321 100644
--- a/src/qemu/qemu_process.h
+++ b/src/qemu/qemu_process.h
@@ -203,9 +203,9 @@ int qemuProcessRefreshDisks(virQEMUDriverPtr driver,
virDomainObjPtr vm,
qemuDomainAsyncJob asyncJob);
-int qemuProcessStartManagedPRDaemon(virDomainObjPtr vm);
+int qemuProcessStartManagedPRDaemon(virDomainObjPtr vm) G_GNUC_NO_INLINE;
-void qemuProcessKillManagedPRDaemon(virDomainObjPtr vm);
+void qemuProcessKillManagedPRDaemon(virDomainObjPtr vm) G_GNUC_NO_INLINE;
typedef struct _qemuProcessQMP qemuProcessQMP;
typedef qemuProcessQMP *qemuProcessQMPPtr;
--
2.26.2