mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-28 10:15:32 -05:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user