File Index
Files and directories
Sign in
FILE

codetag.lds.h

File preview with syntax highlighting.

linux-6.19.14/include/asm-generic/codetag.lds.h C
 1/* SPDX-License-Identifier: GPL-2.0-only */
 2#ifndef __ASM_GENERIC_CODETAG_LDS_H
 3#define __ASM_GENERIC_CODETAG_LDS_H
 4
 5#ifdef CONFIG_MEM_ALLOC_PROFILING
 6#define IF_MEM_ALLOC_PROFILING(...) __VA_ARGS__
 7#else
 8#define IF_MEM_ALLOC_PROFILING(...)
 9#endif
10
11#define SECTION_WITH_BOUNDARIES(_name)	\
12	. = ALIGN(8);			\
13	__start_##_name = .;		\
14	KEEP(*(_name))			\
15	__stop_##_name = .;
16
17#define CODETAG_SECTIONS()		\
18	IF_MEM_ALLOC_PROFILING(SECTION_WITH_BOUNDARIES(alloc_tags))
19
20#define MOD_SEPARATE_CODETAG_SECTION(_name)	\
21	.codetag.##_name : {			\
22		SECTION_WITH_BOUNDARIES(_name)	\
23	}
24
25/*
26 * For codetags which might be used after module unload, therefore might stay
27 * longer in memory. Each such codetag type has its own section so that we can
28 * unload them individually once unused.
29 */
30#define MOD_SEPARATE_CODETAG_SECTIONS()		\
31	IF_MEM_ALLOC_PROFILING(MOD_SEPARATE_CODETAG_SECTION(alloc_tags))
32
33#endif /* __ASM_GENERIC_CODETAG_LDS_H */
~/ Read-only file preview.