12 lines
300 B
C
12 lines
300 B
C
|
#include <stdint.h>
|
||
|
|
||
|
extern uintptr_t SSP_GUARD_SYMBOL;
|
||
|
|
||
|
#include <cpu_aarch64.h>
|
||
|
#define READ_CPU_TICKS cpu_cntpct
|
||
|
|
||
|
__attribute__((always_inline)) static inline void crt_init_ssp(void) {
|
||
|
SSP_GUARD_SYMBOL = READ_CPU_TICKS() + (READ_CPU_TICKS() << 32UL);
|
||
|
SSP_GUARD_SYMBOL &= ~(uintptr_t)0xff00;
|
||
|
}
|