2022-05-31 18:04:11 +08:00
/* SPDX-License-Identifier: GPL-2.0 */
# include < l i n u x / s i z e s . h >
# include < a s m / a s m - o f f s e t s . h >
# include < a s m / t h r e a d _ i n f o . h >
# define P A G E _ S I Z E _ P A G E _ S I Z E
/ *
* Put . b s s . . s w a p p e r _ p g _ d i r a s t h e f i r s t t h i n g i n . b s s . T h i s w i l l
* ensure t h a t i t h a s . b s s a l i g n m e n t ( 6 4 K ) .
* /
# define B S S _ F I R S T _ S E C T I O N S * ( . b s s . . s w a p p e r _ p g _ d i r )
# include < a s m - g e n e r i c / v m l i n u x . l d s . h >
/ *
* Max a v a l i a b l e P a g e S i z e i s 6 4 K , s o w e s e t S e c t i o n A l i g n m e n t
* field o f E F I a p p l i c a t i o n t o 6 4 K .
* /
PECOFF_ F I L E _ A L I G N = 0 x20 0 ;
PECOFF_ S E G M E N T _ A L I G N = 0 x10 0 0 0 ;
OUTPUT_ A R C H ( l o o n g a r c h )
ENTRY( k e r n e l _ e n t r y )
PHDRS {
text P T _ L O A D F L A G S ( 7 ) ; /* RWX */
note P T _ N O T E F L A G S ( 4 ) ; /* R__ */
}
jiffies = j i f f i e s _ 6 4 ;
SECTIONS
{
. = VMLINUX_ L O A D _ A D D R E S S ;
_ text = . ;
HEAD_ T E X T _ S E C T I O N
. = ALIGN( P E C O F F _ S E G M E N T _ A L I G N ) ;
2022-06-25 16:55:41 +08:00
_ stext = . ;
2022-05-31 18:04:11 +08:00
.text : {
TEXT_ T E X T
SCHED_ T E X T
CPUIDLE_ T E X T
LOCK_ T E X T
KPROBES_ T E X T
IRQENTRY_ T E X T
SOFTIRQENTRY_ T E X T
* ( .fixup )
* ( .gnu .warning )
} : text = 0
. = ALIGN( P E C O F F _ S E G M E N T _ A L I G N ) ;
_ etext = . ;
EXCEPTION_ T A B L E ( 1 6 )
. = ALIGN( P E C O F F _ S E G M E N T _ A L I G N ) ;
_ _ init_ b e g i n = . ;
_ _ inittext_ b e g i n = . ;
INIT_ T E X T _ S E C T I O N ( P A G E _ S I Z E )
.exit .text : {
EXIT_ T E X T
}
. = ALIGN( P E C O F F _ S E G M E N T _ A L I G N ) ;
_ _ inittext_ e n d = . ;
_ _ initdata_ b e g i n = . ;
INIT_ D A T A _ S E C T I O N ( 1 6 )
.exit .data : {
EXIT_ D A T A
}
2022-05-31 18:04:12 +08:00
# ifdef C O N F I G _ S M P
PERCPU_ S E C T I O N ( 1 < < C O N F I G _ L 1 _ C A C H E _ S H I F T )
# endif
2022-05-31 18:04:11 +08:00
.init .bss : {
* ( .init .bss )
}
. = ALIGN( P E C O F F _ S E G M E N T _ A L I G N ) ;
_ _ initdata_ e n d = . ;
_ _ init_ e n d = . ;
_ sdata = . ;
RO_ D A T A ( 4 0 9 6 )
RW_ D A T A ( 1 < < C O N F I G _ L 1 _ C A C H E _ S H I F T , P A G E _ S I Z E , T H R E A D _ S I Z E )
.sdata : {
* ( .sdata )
}
.edata_padding : { BYTE( 0 ) ; . = ALIGN(PECOFF_FILE_ALIGN); }
_ edata = . ;
BSS_ S E C T I O N ( 0 , S Z _ 6 4 K , 8 )
. = ALIGN( P E C O F F _ S E G M E N T _ A L I G N ) ;
_ end = . ;
STABS_ D E B U G
DWARF_ D E B U G
2022-06-13 18:54:12 +08:00
ELF_ D E T A I L S
2022-05-31 18:04:11 +08:00
.gptab .sdata : {
* ( .gptab .data )
* ( .gptab .sdata )
}
.gptab .sbss : {
* ( .gptab .bss )
* ( .gptab .sbss )
}
DISCARDS
/ DISCARD/ : {
* ( .gnu .attributes )
* ( .options )
* ( .eh_frame )
}
}