mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
tools/nolibc: create __nolibc_no_sanitize_ubsan
The logic to disable UBSAN will become a bit more complicated. Move it out into compiler.h, so crt.h stays readable. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://patch.msgid.link/20260408-nolibc-gcc-15-v1-1-330d0c40f894@weissschuh.net
This commit is contained in:
parent
598b670af3
commit
08ab958072
|
|
@ -80,4 +80,10 @@
|
|||
/* Make the optimizer believe the variable can be manipulated arbitrarily. */
|
||||
#define _NOLIBC_OPTIMIZER_HIDE_VAR(var) __asm__ ("" : "+r" (var))
|
||||
|
||||
#if __nolibc_has_feature(undefined_behavior_sanitizer)
|
||||
# define __nolibc_no_sanitize_undefined __attribute__((no_sanitize("function")))
|
||||
#else
|
||||
# define __nolibc_no_sanitize_undefined
|
||||
#endif
|
||||
|
||||
#endif /* _NOLIBC_COMPILER_H */
|
||||
|
|
|
|||
|
|
@ -47,10 +47,7 @@ char *__nolibc_program_invocation_short_name(char *long_name)
|
|||
#endif /* NOLIBC_IGNORE_ERRNO */
|
||||
|
||||
void _start_c(long *sp);
|
||||
__attribute__((weak,used))
|
||||
#if __nolibc_has_feature(undefined_behavior_sanitizer)
|
||||
__attribute__((no_sanitize("function")))
|
||||
#endif
|
||||
__attribute__((weak,used)) __nolibc_no_sanitize_undefined
|
||||
void _start_c(long *sp)
|
||||
{
|
||||
long argc;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user