diff --git a/sys/conf/ldscript.amd64 b/sys/conf/ldscript.amd64 index b2ca347a7c85..43fde20370bc 100644 --- a/sys/conf/ldscript.amd64 +++ b/sys/conf/ldscript.amd64 @@ -146,6 +146,10 @@ SECTIONS . = DATA_SEGMENT_RELRO_END (24, .); .got.plt : { *(.got.plt) } . = ALIGN(64); + .data.read_frequently : + { + *(.data.read_frequently) + } .data.read_mostly : { *(.data.read_mostly) diff --git a/sys/sys/systm.h b/sys/sys/systm.h index b70a0d9ac690..30a25ef9620d 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -138,6 +138,7 @@ void kassert_panic(const char *fmt, ...) __printflike(1, 2); * Align variables. */ #define __read_mostly __section(".data.read_mostly") +#define __read_frequently __section(".data.read_frequently") #define __exclusive_cache_line __aligned(CACHE_LINE_SIZE) \ __section(".data.exclusive_cache_line") /*