2019-05-29 07:18:00 -07:00
/* SPDX-License-Identifier: GPL-2.0-only */
2017-07-10 18:08:08 -07:00
/ *
* Copyright ( C ) 2 0 1 2 R e g e n t s o f t h e U n i v e r s i t y o f C a l i f o r n i a
* Copyright ( C ) 2 0 1 7 S i F i v e
* /
# define L O A D _ O F F S E T P A G E _ O F F S E T
# include < a s m / v m l i n u x . l d s . h >
# include < a s m / p a g e . h >
# include < a s m / c a c h e . h >
# include < a s m / t h r e a d _ i n f o . h >
2020-03-10 00:55:40 +08:00
# include < a s m / s e t _ m e m o r y . h >
2020-09-17 15:37:13 -07:00
# include " i m a g e - v a r s . h "
2017-07-10 18:08:08 -07:00
2020-03-17 18:11:39 -07:00
# include < l i n u x / s i z e s . h >
2017-07-10 18:08:08 -07:00
OUTPUT_ A R C H ( r i s c v )
ENTRY( _ s t a r t )
jiffies = j i f f i e s _ 6 4 ;
2020-09-17 15:37:13 -07:00
PECOFF_ S E C T I O N _ A L I G N M E N T = 0 x10 0 0 ;
PECOFF_ F I L E _ A L I G N M E N T = 0 x20 0 ;
2017-07-10 18:08:08 -07:00
SECTIONS
{
/* Beginning of code and text segment */
. = LOAD_ O F F S E T ;
_ start = . ;
HEAD_ T E X T _ S E C T I O N
2020-03-17 18:11:39 -07:00
. = ALIGN( P A G E _ S I Z E ) ;
2020-11-04 16:04:38 -08:00
.text : {
_ text = . ;
_ stext = . ;
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
ENTRY_ T E X T
IRQENTRY_ T E X T
SOFTIRQENTRY_ T E X T
* ( .fixup )
_ etext = . ;
}
. = ALIGN( S E C T I O N _ A L I G N ) ;
2020-03-17 18:11:39 -07:00
_ _ init_ b e g i n = . ;
2020-11-04 16:04:37 -08:00
_ _ init_ t e x t _ b e g i n = . ;
.init .text : AT( A D D R ( . i n i t . t e x t ) - L O A D _ O F F S E T ) A L I G N ( S E C T I O N _ A L I G N ) { \
_ sinittext = . ; \
INIT_ T E X T \
_ einittext = . ; \
}
2020-03-16 09:47:38 +09:00
. = ALIGN( 8 ) ;
_ _ soc_ e a r l y _ i n i t _ t a b l e : {
_ _ soc_ e a r l y _ i n i t _ t a b l e _ s t a r t = . ;
KEEP( * ( _ _ s o c _ e a r l y _ i n i t _ t a b l e ) )
_ _ soc_ e a r l y _ i n i t _ t a b l e _ e n d = . ;
}
2020-04-14 13:43:24 +09:00
_ _ soc_ b u i l t i n _ d t b _ t a b l e : {
_ _ soc_ b u i l t i n _ d t b _ t a b l e _ s t a r t = . ;
KEEP( * ( _ _ s o c _ b u i l t i n _ d t b _ t a b l e ) )
_ _ soc_ b u i l t i n _ d t b _ t a b l e _ e n d = . ;
}
2017-07-10 18:08:08 -07:00
/* we have to discard exit text and such at runtime, not link time */
.exit .text :
{
EXIT_ T E X T
}
2020-11-04 16:04:38 -08:00
_ _ init_ t e x t _ e n d = . ;
2020-03-10 00:55:40 +08:00
. = ALIGN( S E C T I O N _ A L I G N ) ;
2020-09-17 15:37:13 -07:00
# ifdef C O N F I G _ E F I
. = ALIGN( P E C O F F _ S E C T I O N _ A L I G N M E N T ) ;
_ _ pecoff_ t e x t _ e n d = . ;
# endif
2020-11-04 16:04:38 -08:00
/* Start of init data section */
_ _ init_ d a t a _ b e g i n = . ;
2020-10-06 16:49:33 +00:00
INIT_ D A T A _ S E C T I O N ( 1 6 )
2020-11-04 16:04:38 -08:00
.exit .data :
{
EXIT_ D A T A
}
PERCPU_ S E C T I O N ( L 1 _ C A C H E _ B Y T E S )
2020-11-04 16:04:39 -08:00
.rel .dyn : {
* ( .rel .dyn * )
}
2020-11-04 16:04:38 -08:00
_ _ init_ d a t a _ e n d = . ;
_ _ init_ e n d = . ;
2020-10-06 16:49:33 +00:00
2017-07-10 18:08:08 -07:00
/* Start of data section */
_ sdata = . ;
2020-03-10 00:55:40 +08:00
RO_ D A T A ( S E C T I O N _ A L I G N )
2017-07-10 18:08:08 -07:00
.srodata : {
* ( .srodata * )
}
2020-03-10 00:55:39 +08:00
EXCEPTION_ T A B L E ( 0 x10 )
2020-03-10 00:55:40 +08:00
. = ALIGN( S E C T I O N _ A L I G N ) ;
2020-03-10 00:55:39 +08:00
_ data = . ;
2019-10-29 14:13:35 -07:00
RW_ D A T A ( L 1 _ C A C H E _ B Y T E S , P A G E _ S I Z E , T H R E A D _ S I Z E )
2017-07-10 18:08:08 -07:00
.sdata : {
_ _ global_ p o i n t e r $ = . + 0 x80 0 ;
* ( .sdata * )
}
2020-09-17 15:37:13 -07:00
# ifdef C O N F I G _ E F I
.pecoff_edata_padding : { BYTE( 0 ) ; . = ALIGN(PECOFF_FILE_ALIGNMENT); }
_ _ pecoff_ d a t a _ r a w _ s i z e = A B S O L U T E ( . - _ _ p e c o f f _ t e x t _ e n d ) ;
# endif
/* End of data section */
_ edata = . ;
2019-02-08 09:11:08 -08:00
BSS_ S E C T I O N ( P A G E _ S I Z E , P A G E _ S I Z E , 0 )
2020-09-17 15:37:13 -07:00
# ifdef C O N F I G _ E F I
. = ALIGN( P E C O F F _ S E C T I O N _ A L I G N M E N T ) ;
_ _ pecoff_ d a t a _ v i r t _ s i z e = A B S O L U T E ( . - _ _ p e c o f f _ t e x t _ e n d ) ;
# endif
2017-07-10 18:08:08 -07:00
_ end = . ;
STABS_ D E B U G
DWARF_ D E B U G
2020-08-21 12:42:45 -07:00
ELF_ D E T A I L S
2017-07-10 18:08:08 -07:00
DISCARDS
}