func(q); \
} \
/* The actual destructor structure */ \
- __attribute__ ((__section__("SYSTEMD_STATIC_DESTRUCT"))) \
- __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))) \
- __attribute__ ((__used__)) \
+ _section_("SYSTEMD_STATIC_DESTRUCT") \
+ _alignptr_ \
+ _used_ \
static const StaticDestructor UNIQ_T(static_destructor_entry, uq) = { \
.data = &(variable), \
.destroy = UNIQ_T(static_destructor_wrapper, uq), \
if (!__start_SYSTEMD_STATIC_DESTRUCT)
return;
- d = ALIGN_TO_PTR(__start_SYSTEMD_STATIC_DESTRUCT, __BIGGEST_ALIGNMENT__);
+ d = ALIGN_TO_PTR(__start_SYSTEMD_STATIC_DESTRUCT, sizeof(void*));
while (d < __stop_SYSTEMD_STATIC_DESTRUCT) {
d->destroy(d->data);
- d = ALIGN_TO_PTR(d + 1, __BIGGEST_ALIGNMENT__);
+ d = ALIGN_TO_PTR(d + 1, sizeof(void*));
}
}
};
/* GCC maps this magically to the beginning and end of the BUS_ERROR_MAP section */
-extern const sd_bus_error_map __start_BUS_ERROR_MAP[];
-extern const sd_bus_error_map __stop_BUS_ERROR_MAP[];
+extern const sd_bus_error_map __start_SYSTEMD_BUS_ERROR_MAP[];
+extern const sd_bus_error_map __stop_SYSTEMD_BUS_ERROR_MAP[];
/* Additional maps registered with sd_bus_error_add_map() are in this
* NULL terminated array */
return m->code;
}
- m = __start_BUS_ERROR_MAP;
+ m = ALIGN_TO_PTR(__start_SYSTEMD_BUS_ERROR_MAP, sizeof(void*));
#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
- while (m < __stop_BUS_ERROR_MAP) {
+ while (m < __stop_SYSTEMD_BUS_ERROR_MAP) {
/* For magic ELF error maps, the end marker might
* appear in the middle of things, since multiple maps
* might appear in the same section. Hence, let's skip
* boundary, which is the selected alignment for the
* arrays. */
if (m->code == BUS_ERROR_MAP_END_MARKER) {
- m = ALIGN8_PTR(m+1);
+ m = ALIGN_TO_PTR(m + 1, sizeof(void*));
continue;
}
*/
#define BUS_ERROR_MAP_ELF_REGISTER \
- __attribute__ ((__section__("BUS_ERROR_MAP"))) \
- __attribute__ ((__used__)) \
- __attribute__ ((__aligned__(8)))
+ _section_("SYSTEMD_BUS_ERROR_MAP") \
+ _used_ \
+ _alignptr_
#define BUS_ERROR_MAP_ELF_USE(errors) \
extern const sd_bus_error_map errors[]; \
- __attribute__ ((__used__)) \
+ _used_ \
static const sd_bus_error_map * const CONCATENATE(errors ## _copy_, __COUNTER__) = errors;
/* We use something exotic as end marker, to ensure people build the
assert_se(!sd_bus_error_is_set(&error));
}
-extern const sd_bus_error_map __start_BUS_ERROR_MAP[];
-extern const sd_bus_error_map __stop_BUS_ERROR_MAP[];
+extern const sd_bus_error_map __start_SYSTEMD_BUS_ERROR_MAP[];
+extern const sd_bus_error_map __stop_SYSTEMD_BUS_ERROR_MAP[];
static void dump_mapping_table(void) {
const sd_bus_error_map *m;
printf("----- errno mappings ------\n");
- m = __start_BUS_ERROR_MAP;
- while (m < __stop_BUS_ERROR_MAP) {
+ m = ALIGN_TO_PTR(__start_SYSTEMD_BUS_ERROR_MAP, sizeof(void*));
+ while (m < __stop_SYSTEMD_BUS_ERROR_MAP) {
if (m->code == BUS_ERROR_MAP_END_MARKER) {
- m = ALIGN8_PTR(m+1);
+ m = ALIGN_TO_PTR(m + 1, sizeof(void*));
continue;
}