boot: inline a single-use variable
Also, in general we prefer variables that are always defined over checking with #ifdef, so #if defined(HAVE_NO_STACK_PROTECTOR_ATTRIBUTE) is something that we want to avoid.
This commit is contained in:
+6
-9
@@ -5,15 +5,12 @@
|
||||
#include "efi-string.h"
|
||||
#include "proto/simple-text-io.h" /* IWYU pragma: keep */
|
||||
|
||||
#if defined __has_attribute
|
||||
# if __has_attribute(no_stack_protector)
|
||||
# define HAVE_NO_STACK_PROTECTOR_ATTRIBUTE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_NO_STACK_PROTECTOR_ATTRIBUTE) && \
|
||||
(defined(__SSP__) || defined(__SSP_ALL__) || \
|
||||
defined(__SSP_STRONG__) || defined(__SSP_EXPLICIT__))
|
||||
#if defined(__has_attribute) && \
|
||||
__has_attribute(no_stack_protector) && \
|
||||
(defined(__SSP__) || \
|
||||
defined(__SSP_ALL__) || \
|
||||
defined(__SSP_STRONG__) || \
|
||||
defined(__SSP_EXPLICIT__))
|
||||
# define STACK_PROTECTOR_RANDOM 1
|
||||
__attribute__((no_stack_protector, noinline)) void __stack_chk_guard_init(void);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user