diff --git a/src/modules/module-protocol-pulse/module.h b/src/modules/module-protocol-pulse/module.h index c1153640e..f75d8786c 100644 --- a/src/modules/module-protocol-pulse/module.h +++ b/src/modules/module-protocol-pulse/module.h @@ -47,6 +47,7 @@ struct module_info { #define DEFINE_MODULE_INFO(name) \ __attribute__((used)) \ + __attribute__((retain)) \ __attribute__((section("pw_mod_pulse_modules"))) \ __attribute__((aligned(__alignof__(struct module_info)))) \ const struct module_info name diff --git a/test/pwtest-implementation.h b/test/pwtest-implementation.h index 7bfad01cf..1525d2056 100644 --- a/test/pwtest-implementation.h +++ b/test/pwtest-implementation.h @@ -131,7 +131,7 @@ void _pwtest_add(struct pwtest_context *ctx, struct pwtest_suite_decl { const char *name; enum pwtest_result (*setup)(struct pwtest_context *, struct pwtest_suite *); -} __attribute__((aligned(16))); +}; #endif /* PWTEST_IMPLEMENTATION_H */ diff --git a/test/pwtest.h b/test/pwtest.h index 9c0737523..6d3070b79 100644 --- a/test/pwtest.h +++ b/test/pwtest.h @@ -494,9 +494,11 @@ enum pwtest_arg { */ #define PWTEST_SUITE(cname) \ static enum pwtest_result (cname##__setup)(struct pwtest_context *ctx, struct pwtest_suite *suite); \ - static const struct pwtest_suite_decl _test_suite \ __attribute__((used)) \ - __attribute((section("pwtest_suite_section"))) = { \ + __attribute__((retain)) \ + __attribute__((section("pwtest_suite_section"))) \ + __attribute__((aligned(__alignof__(struct pwtest_suite_decl)))) \ + static const struct pwtest_suite_decl _test_suite = { \ .name = #cname, \ .setup = cname##__setup, \ }; \