#define __packed __attribute__((__packed__))
+#define __weak __attribute__((__weak__))
+
#if (!defined(__clang__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 5))
#define unreachable() do {} while (1)
#else
* executed in series by the livepatch infrastructure at patch load time.
*/
#define LIVEPATCH_LOAD_HOOK(_fn) \
- livepatch_loadcall_t *__attribute__((weak)) \
+ livepatch_loadcall_t *__weak \
const livepatch_load_data_##_fn __section(".livepatch.hooks.load") = _fn;
/*
* Same as LOAD hook with s/load/unload/
*/
#define LIVEPATCH_UNLOAD_HOOK(_fn) \
- livepatch_unloadcall_t *__attribute__((weak)) \
+ livepatch_unloadcall_t *__weak \
const livepatch_unload_data_##_fn __section(".livepatch.hooks.unload") = _fn;
#endif /* __XEN_LIVEPATCH_PAYLOAD_H__ */