diff --git a/gplugin/tests/bad-plugins/query-error.c b/gplugin/tests/bad-plugins/query-error.c
--- a/gplugin/tests/bad-plugins/query-error.c
+++ b/gplugin/tests/bad-plugins/query-error.c
@@ -18,26 +18,19 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(query_error)
 {
 	g_set_error(error, GPLUGIN_DOMAIN, 0, "expected error");
 
 	return NULL;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(query_error)
 {
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(query_error)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/bind-global/bind-global.c b/gplugin/tests/bind-global/bind-global.c
--- a/gplugin/tests/bind-global/bind-global.c
+++ b/gplugin/tests/bind-global/bind-global.c
@@ -18,8 +18,7 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(bind_global)
 {
 	/* clang-format off */
 	return gplugin_plugin_info_new(
@@ -30,18 +29,12 @@
 	/* clang-format on */
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(bind_global)
 {
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(bind_global)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/dynamic-type/dynamic-type-provider.c b/gplugin/tests/dynamic-type/dynamic-type-provider.c
--- a/gplugin/tests/dynamic-type/dynamic-type-provider.c
+++ b/gplugin/tests/dynamic-type/dynamic-type-provider.c
@@ -38,8 +38,7 @@
 {
 }
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(dynamic_type_provider)
 {
 	return gplugin_plugin_info_new(
 		"gplugin/dynamic-type-provider",
@@ -49,18 +48,14 @@
 		NULL);
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(GPluginNativePlugin *plugin, G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(dynamic_type_provider)
 {
 	dynamic_test_register_type(G_TYPE_MODULE(plugin));
 
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(dynamic_type_provider)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/dynamic-type/dynamic-type-user.c b/gplugin/tests/dynamic-type/dynamic-type-user.c
--- a/gplugin/tests/dynamic-type/dynamic-type-user.c
+++ b/gplugin/tests/dynamic-type/dynamic-type-user.c
@@ -23,8 +23,7 @@
 
 static DynamicTest *test_object = NULL;
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(dynamic_type_user)
 {
 	const gchar *const dependencies[] = {"gplugin/dynamic-type-provider", NULL};
 
@@ -37,8 +36,7 @@
 	/* clang-format on */
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(G_GNUC_UNUSED GPluginNativePlugin *plugin, GError **error)
+GPLUGIN_LOAD(dynamic_type_user)
 {
 	test_object = g_object_new(DYNAMIC_TYPE_TEST, NULL);
 
@@ -54,8 +52,7 @@
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(G_GNUC_UNUSED GPluginNativePlugin *plugin, GError **error)
+GPLUGIN_UNLOAD(dynamic_type_user)
 {
 	gpointer weak_test_object = test_object;
 	g_object_add_weak_pointer(G_OBJECT(test_object), &weak_test_object);
diff --git a/gplugin/tests/id-collision/id-collision1.c b/gplugin/tests/id-collision/id-collision1.c
--- a/gplugin/tests/id-collision/id-collision1.c
+++ b/gplugin/tests/id-collision/id-collision1.c
@@ -18,8 +18,7 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(id_collision1)
 {
 	/* clang-format off */
 	return gplugin_plugin_info_new(
@@ -30,18 +29,12 @@
 	/* clang-format on */
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(id_collision1)
 {
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(id_collision1)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/id-collision/id-collision2.c b/gplugin/tests/id-collision/id-collision2.c
--- a/gplugin/tests/id-collision/id-collision2.c
+++ b/gplugin/tests/id-collision/id-collision2.c
@@ -18,8 +18,7 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(id_collision2)
 {
 	/* clang-format off */
 	return gplugin_plugin_info_new(
@@ -30,18 +29,12 @@
 	/* clang-format on */
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(id_collision2)
 {
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(id_collision2)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/load-on-query-fail/load-on-query-fail.c b/gplugin/tests/load-on-query-fail/load-on-query-fail.c
--- a/gplugin/tests/load-on-query-fail/load-on-query-fail.c
+++ b/gplugin/tests/load-on-query-fail/load-on-query-fail.c
@@ -18,8 +18,7 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(load_on_query_fail)
 {
 	/* clang-format off */
 	return gplugin_plugin_info_new(
@@ -30,8 +29,7 @@
 	/* clang-format on */
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(G_GNUC_UNUSED GPluginNativePlugin *plugin, GError **error)
+GPLUGIN_LOAD(load_on_query_fail)
 {
 	static int count = 1;
 
@@ -40,10 +38,7 @@
 	return FALSE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(load_on_query_fail)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/load-on-query-pass/load-on-query-pass.c b/gplugin/tests/load-on-query-pass/load-on-query-pass.c
--- a/gplugin/tests/load-on-query-pass/load-on-query-pass.c
+++ b/gplugin/tests/load-on-query-pass/load-on-query-pass.c
@@ -18,8 +18,7 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(load_on_query)
 {
 	/* clang-format off */
 	return gplugin_plugin_info_new(
@@ -30,18 +29,12 @@
 	/* clang-format on */
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(load_on_query)
 {
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(load_on_query)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/newest-version/multiple-semantic-1.0.0.c b/gplugin/tests/newest-version/multiple-semantic-1.0.0.c
--- a/gplugin/tests/newest-version/multiple-semantic-1.0.0.c
+++ b/gplugin/tests/newest-version/multiple-semantic-1.0.0.c
@@ -18,8 +18,7 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(multiple_semantic_1_0_0)
 {
 	/* clang-format off */
 	return gplugin_plugin_info_new(
@@ -30,18 +29,12 @@
 	/* clang-format on */
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(multiple_semantic_1_0_0)
 {
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(multiple_semantic_1_0_0)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/newest-version/multiple-semantic-1.1.0.c b/gplugin/tests/newest-version/multiple-semantic-1.1.0.c
--- a/gplugin/tests/newest-version/multiple-semantic-1.1.0.c
+++ b/gplugin/tests/newest-version/multiple-semantic-1.1.0.c
@@ -18,8 +18,7 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(multiple_semantic_1_1_0)
 {
 	/* clang-format off */
 	return gplugin_plugin_info_new(
@@ -30,18 +29,12 @@
 	/* clang-format on */
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(multiple_semantic_1_1_0)
 {
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(multiple_semantic_1_1_0)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/newest-version/no-version-and-semantic-no-version.c b/gplugin/tests/newest-version/no-version-and-semantic-no-version.c
--- a/gplugin/tests/newest-version/no-version-and-semantic-no-version.c
+++ b/gplugin/tests/newest-version/no-version-and-semantic-no-version.c
@@ -18,8 +18,7 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(no_version_and_semantic_none)
 {
 	/* clang-format off */
 	return gplugin_plugin_info_new(
@@ -29,18 +28,12 @@
 	/* clang-format on */
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(no_version_and_semantic_none)
 {
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(no_version_and_semantic_none)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/newest-version/no-version-and-semantic-semantic.c b/gplugin/tests/newest-version/no-version-and-semantic-semantic.c
--- a/gplugin/tests/newest-version/no-version-and-semantic-semantic.c
+++ b/gplugin/tests/newest-version/no-version-and-semantic-semantic.c
@@ -18,8 +18,7 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(no_version_and_semantic_1_0_0)
 {
 	/* clang-format off */
 	return gplugin_plugin_info_new(
@@ -30,18 +29,12 @@
 	/* clang-format on */
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(no_version_and_semantic_1_0_0)
 {
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(no_version_and_semantic_1_0_0)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/newest-version/non-semantic-and-semantic-non-semantic.c b/gplugin/tests/newest-version/non-semantic-and-semantic-non-semantic.c
--- a/gplugin/tests/newest-version/non-semantic-and-semantic-non-semantic.c
+++ b/gplugin/tests/newest-version/non-semantic-and-semantic-non-semantic.c
@@ -18,8 +18,7 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(non_semantic_and_semantic_abc123)
 {
 	/* clang-format off */
 	return gplugin_plugin_info_new(
@@ -30,18 +29,12 @@
 	/* clang-format on */
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(non_semantic_and_semantic_abc123)
 {
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(non_semantic_and_semantic_abc123)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/newest-version/non-semantic-and-semantic-semantic.c b/gplugin/tests/newest-version/non-semantic-and-semantic-semantic.c
--- a/gplugin/tests/newest-version/non-semantic-and-semantic-semantic.c
+++ b/gplugin/tests/newest-version/non-semantic-and-semantic-semantic.c
@@ -18,8 +18,7 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(non_semantic_and_semantic_1_0_0)
 {
 	/* clang-format off */
 	return gplugin_plugin_info_new(
@@ -30,18 +29,12 @@
 	/* clang-format on */
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(non_semantic_and_semantic_1_0_0)
 {
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(non_semantic_and_semantic_1_0_0)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/newest-version/solo-no-version.c b/gplugin/tests/newest-version/solo-no-version.c
--- a/gplugin/tests/newest-version/solo-no-version.c
+++ b/gplugin/tests/newest-version/solo-no-version.c
@@ -18,8 +18,7 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(solo_no_version)
 {
 	/* clang-format off */
 	return gplugin_plugin_info_new(
@@ -29,18 +28,12 @@
 	/* clang-format on */
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(solo_no_version)
 {
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(solo_no_version)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/newest-version/solo-non-semantic.c b/gplugin/tests/newest-version/solo-non-semantic.c
--- a/gplugin/tests/newest-version/solo-non-semantic.c
+++ b/gplugin/tests/newest-version/solo-non-semantic.c
@@ -18,8 +18,7 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(solo_non_semantic)
 {
 	/* clang-format off */
 	return gplugin_plugin_info_new(
@@ -30,18 +29,12 @@
 	/* clang-format on */
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(solo_non_semantic)
 {
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(solo_non_semantic)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/plugins/basic-plugin.c b/gplugin/tests/plugins/basic-plugin.c
--- a/gplugin/tests/plugins/basic-plugin.c
+++ b/gplugin/tests/plugins/basic-plugin.c
@@ -18,8 +18,7 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(native_basic_plugin)
 {
 	const gchar *const authors[] = {"author1", NULL};
 
@@ -39,18 +38,12 @@
 	/* clang-format on */
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(native_basic_plugin)
 {
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(native_basic_plugin)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/plugins/broken-dependent-plugin.c b/gplugin/tests/plugins/broken-dependent-plugin.c
--- a/gplugin/tests/plugins/broken-dependent-plugin.c
+++ b/gplugin/tests/plugins/broken-dependent-plugin.c
@@ -18,8 +18,7 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(broken_dependent_native_plugin)
 {
 	const gchar *const dependencies[] = {"gplugin/does-not-exist", NULL};
 
@@ -32,18 +31,12 @@
 	/* clang-format on */
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(broken_dependent_native_plugin)
 {
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(broken_dependent_native_plugin)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/plugins/dependent-plugin.c b/gplugin/tests/plugins/dependent-plugin.c
--- a/gplugin/tests/plugins/dependent-plugin.c
+++ b/gplugin/tests/plugins/dependent-plugin.c
@@ -18,8 +18,7 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(native_dependent_plugin)
 {
 	const gchar *const dependencies[] = {"dependency1", "dependency2", NULL};
 
@@ -32,18 +31,12 @@
 	/* clang-format on */
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(native_dependent_plugin)
 {
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(native_dependent_plugin)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/plugins/load-exception.c b/gplugin/tests/plugins/load-exception.c
--- a/gplugin/tests/plugins/load-exception.c
+++ b/gplugin/tests/plugins/load-exception.c
@@ -18,8 +18,7 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(native_load_exception)
 {
 	return gplugin_plugin_info_new(
 		"gplugin/native-load-exception",
@@ -27,18 +26,12 @@
 		NULL);
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(native_load_exception)
 {
 	return FALSE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(native_load_exception)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/plugins/load-failed.c b/gplugin/tests/plugins/load-failed.c
--- a/gplugin/tests/plugins/load-failed.c
+++ b/gplugin/tests/plugins/load-failed.c
@@ -18,8 +18,7 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(native_load_failed)
 {
 	return gplugin_plugin_info_new(
 		"gplugin/native-load-failed",
@@ -27,18 +26,14 @@
 		NULL);
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(G_GNUC_UNUSED GPluginNativePlugin *plugin, GError **error)
+GPLUGIN_LOAD(native_load_failed)
 {
 	g_set_error(error, GPLUGIN_DOMAIN, 0, "expected error");
 
 	return FALSE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(native_load_failed)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/plugins/unload-failed.c b/gplugin/tests/plugins/unload-failed.c
--- a/gplugin/tests/plugins/unload-failed.c
+++ b/gplugin/tests/plugins/unload-failed.c
@@ -18,8 +18,7 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(native_unload_failed)
 {
 	return gplugin_plugin_info_new(
 		"gplugin/native-unload-failed",
@@ -27,16 +26,12 @@
 		NULL);
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(native_unload_failed)
 {
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(G_GNUC_UNUSED GPluginNativePlugin *plugin, GError **error)
+GPLUGIN_UNLOAD(native_unload_failed)
 {
 	g_set_error(error, GPLUGIN_DOMAIN, 0, "expected error");
 
diff --git a/gplugin/tests/unresolved-symbol/unresolved-symbol.c b/gplugin/tests/unresolved-symbol/unresolved-symbol.c
--- a/gplugin/tests/unresolved-symbol/unresolved-symbol.c
+++ b/gplugin/tests/unresolved-symbol/unresolved-symbol.c
@@ -20,26 +20,19 @@
 
 void some_unresolved_symbol(void);
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(unresolved_symbol)
 {
 	some_unresolved_symbol();
 
 	return NULL;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(unresolved_symbol)
 {
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(unresolved_symbol)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/versioned-dependencies/bar.c b/gplugin/tests/versioned-dependencies/bar.c
--- a/gplugin/tests/versioned-dependencies/bar.c
+++ b/gplugin/tests/versioned-dependencies/bar.c
@@ -18,8 +18,7 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(bar)
 {
 	/* clang-format off */
 	return gplugin_plugin_info_new(
@@ -30,18 +29,12 @@
 	/* clang-format on */
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(bar)
 {
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(bar)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/versioned-dependencies/baz.c b/gplugin/tests/versioned-dependencies/baz.c
--- a/gplugin/tests/versioned-dependencies/baz.c
+++ b/gplugin/tests/versioned-dependencies/baz.c
@@ -18,8 +18,7 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(baz)
 {
 	/* clang-format off */
 	return gplugin_plugin_info_new(
@@ -30,18 +29,12 @@
 	/* clang-format on */
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(baz)
 {
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(baz)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/versioned-dependencies/exact1.c b/gplugin/tests/versioned-dependencies/exact1.c
--- a/gplugin/tests/versioned-dependencies/exact1.c
+++ b/gplugin/tests/versioned-dependencies/exact1.c
@@ -18,8 +18,7 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(test_exact1)
 {
 	/* clang-format off */
 	return gplugin_plugin_info_new(
@@ -30,18 +29,12 @@
 	/* clang-format on */
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(test_exact1)
 {
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(test_exact1)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/versioned-dependencies/exact2.c b/gplugin/tests/versioned-dependencies/exact2.c
--- a/gplugin/tests/versioned-dependencies/exact2.c
+++ b/gplugin/tests/versioned-dependencies/exact2.c
@@ -18,8 +18,7 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(test_exact2)
 {
 	/* clang-format off */
 	return gplugin_plugin_info_new(
@@ -30,18 +29,12 @@
 	/* clang-format on */
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(test_exact2)
 {
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(test_exact2)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/versioned-dependencies/fez.c b/gplugin/tests/versioned-dependencies/fez.c
--- a/gplugin/tests/versioned-dependencies/fez.c
+++ b/gplugin/tests/versioned-dependencies/fez.c
@@ -18,8 +18,7 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(fez)
 {
 	/* clang-format off */
 	return gplugin_plugin_info_new(
@@ -30,18 +29,12 @@
 	/* clang-format on */
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(fez)
 {
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(fez)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/versioned-dependencies/greater-equal.c b/gplugin/tests/versioned-dependencies/greater-equal.c
--- a/gplugin/tests/versioned-dependencies/greater-equal.c
+++ b/gplugin/tests/versioned-dependencies/greater-equal.c
@@ -18,8 +18,7 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(test_greater_equal)
 {
 	/* clang-format off */
 	return gplugin_plugin_info_new(
@@ -30,18 +29,12 @@
 	/* clang-format on */
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(test_greater_equal)
 {
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(test_greater_equal)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/versioned-dependencies/greater.c b/gplugin/tests/versioned-dependencies/greater.c
--- a/gplugin/tests/versioned-dependencies/greater.c
+++ b/gplugin/tests/versioned-dependencies/greater.c
@@ -18,8 +18,7 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(test_greater)
 {
 	/* clang-format off */
 	return gplugin_plugin_info_new(
@@ -30,18 +29,12 @@
 	/* clang-format on */
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(test_greater)
 {
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(test_greater)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/versioned-dependencies/less-equal.c b/gplugin/tests/versioned-dependencies/less-equal.c
--- a/gplugin/tests/versioned-dependencies/less-equal.c
+++ b/gplugin/tests/versioned-dependencies/less-equal.c
@@ -18,8 +18,7 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(test_less_equal)
 {
 	/* clang-format off */
 	return gplugin_plugin_info_new(
@@ -30,18 +29,12 @@
 	/* clang-format on */
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(test_less_equal)
 {
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(test_less_equal)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/versioned-dependencies/less.c b/gplugin/tests/versioned-dependencies/less.c
--- a/gplugin/tests/versioned-dependencies/less.c
+++ b/gplugin/tests/versioned-dependencies/less.c
@@ -18,8 +18,7 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(test_less)
 {
 	/* clang-format off */
 	return gplugin_plugin_info_new(
@@ -30,18 +29,12 @@
 	/* clang-format on */
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(test_less)
 {
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(test_less)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/versioned-dependencies/no-version.c b/gplugin/tests/versioned-dependencies/no-version.c
--- a/gplugin/tests/versioned-dependencies/no-version.c
+++ b/gplugin/tests/versioned-dependencies/no-version.c
@@ -18,24 +18,17 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(test_no_version)
 {
 	return gplugin_plugin_info_new("gplugin/test-no-version", 0x04030201, NULL);
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(test_no_version)
 {
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(test_no_version)
 {
 	return TRUE;
 }
diff --git a/gplugin/tests/versioned-dependencies/super-dependent.c b/gplugin/tests/versioned-dependencies/super-dependent.c
--- a/gplugin/tests/versioned-dependencies/super-dependent.c
+++ b/gplugin/tests/versioned-dependencies/super-dependent.c
@@ -18,8 +18,7 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
+GPLUGIN_QUERY(super_dependent)
 {
 	/* clang-format-11 formats this correctly, so this can be removed then. */
 	/* clang-format off */
@@ -47,18 +46,12 @@
 	/* clang-format on */
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_LOAD(super_dependent)
 {
 	return TRUE;
 }
 
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
+GPLUGIN_UNLOAD(super_dependent)
 {
 	return TRUE;
 }
