xref: /OK3568_Linux_fs/kernel/arch/arm64/include/asm/module.lds.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun #ifdef CONFIG_ARM64_MODULE_PLTS
2*4882a593Smuzhiyun SECTIONS {
3*4882a593Smuzhiyun 	.plt 0 : { BYTE(0) }
4*4882a593Smuzhiyun 	.init.plt 0 : { BYTE(0) }
5*4882a593Smuzhiyun 	.text.ftrace_trampoline 0 : { BYTE(0) }
6*4882a593Smuzhiyun 
7*4882a593Smuzhiyun #ifdef CONFIG_CRYPTO_FIPS140
8*4882a593Smuzhiyun 	/*
9*4882a593Smuzhiyun 	 * The FIPS140 module incorporates copies of builtin code, which gets
10*4882a593Smuzhiyun 	 * integrity checked at module load time, and registered in a way that
11*4882a593Smuzhiyun 	 * ensures that the integrity checked versions supersede the builtin
12*4882a593Smuzhiyun 	 * ones.  These objects are compiled as builtin code, and so their init
13*4882a593Smuzhiyun 	 * hooks will be exported from the binary in the same way as builtin
14*4882a593Smuzhiyun 	 * initcalls are, i.e., annotated with a level that defines the order
15*4882a593Smuzhiyun 	 * in which the hooks are expected to be invoked.
16*4882a593Smuzhiyun 	 */
17*4882a593Smuzhiyun #define INIT_CALLS_LEVEL(level)						\
18*4882a593Smuzhiyun 		KEEP(*(.initcall##level##.init*))			\
19*4882a593Smuzhiyun 		KEEP(*(.initcall##level##s.init*))
20*4882a593Smuzhiyun 
21*4882a593Smuzhiyun 	.initcalls : {
22*4882a593Smuzhiyun 		*(.initcalls._start)
23*4882a593Smuzhiyun 		INIT_CALLS_LEVEL(0)
24*4882a593Smuzhiyun 		INIT_CALLS_LEVEL(1)
25*4882a593Smuzhiyun 		INIT_CALLS_LEVEL(2)
26*4882a593Smuzhiyun 		INIT_CALLS_LEVEL(3)
27*4882a593Smuzhiyun 		INIT_CALLS_LEVEL(4)
28*4882a593Smuzhiyun 		INIT_CALLS_LEVEL(5)
29*4882a593Smuzhiyun 		INIT_CALLS_LEVEL(rootfs)
30*4882a593Smuzhiyun 		INIT_CALLS_LEVEL(6)
31*4882a593Smuzhiyun 		INIT_CALLS_LEVEL(7)
32*4882a593Smuzhiyun 		*(.initcalls._end)
33*4882a593Smuzhiyun 	}
34*4882a593Smuzhiyun #endif
35*4882a593Smuzhiyun }
36*4882a593Smuzhiyun #endif
37