tools/nolibc: add __nolibc_aligned() and __nolibc_aligned_as()

Provide a convenience macro around __attribute__((aligned)).

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Willy Tarreau <w@1wt.eu>
Link: https://lore.kernel.org/r/20250419-nolibc-ubsan-v2-2-060b8a016917@weissschuh.net
This commit is contained in:
Thomas Weißschuh
2025-04-19 12:46:19 +02:00
parent 8399f14666
commit f4152715dc

View File

@@ -18,6 +18,9 @@
# define __nolibc_has_feature(feature) 0
#endif
#define __nolibc_aligned(alignment) __attribute__((aligned(alignment)))
#define __nolibc_aligned_as(type) __nolibc_aligned(__alignof__(type))
#if __nolibc_has_attribute(naked)
# define __nolibc_entrypoint __attribute__((naked))
# define __nolibc_entrypoint_epilogue()