2005-04-17 02:20:36 +04:00
/ * ld s c r i p t t o m a k e i 3 8 6 L i n u x k e r n e l
* Written b y M a r t i n M a r e s < m j @atrey.karlin.mff.cuni.cz>;
* /
2005-06-26 01:57:47 +04:00
# define L O A D _ O F F S E T _ _ P A G E _ O F F S E T
2005-04-17 02:20:36 +04:00
# include < a s m - g e n e r i c / v m l i n u x . l d s . h >
# include < a s m / t h r e a d _ i n f o . h >
# include < a s m / p a g e . h >
OUTPUT_ F O R M A T ( " e l f32 - i 3 8 6 " , " e l f32 - i 3 8 6 " , " e l f32 - i 3 8 6 " )
OUTPUT_ A R C H ( i 3 8 6 )
2005-06-26 01:57:47 +04:00
ENTRY( p h y s _ s t a r t u p _ 3 2 )
2005-04-17 02:20:36 +04:00
jiffies = j i f f i e s _ 6 4 ;
SECTIONS
{
2005-06-26 01:57:49 +04:00
. = _ _ KERNEL_ S T A R T ;
2005-06-26 01:57:47 +04:00
phys_ s t a r t u p _ 3 2 = s t a r t u p _ 3 2 - L O A D _ O F F S E T ;
2005-04-17 02:20:36 +04:00
/* read-only */
_ text = . ; /* Text and read-only data */
2005-06-26 01:57:47 +04:00
.text : AT( A D D R ( . t e x t ) - L O A D _ O F F S E T ) {
2005-04-17 02:20:36 +04:00
* ( .text )
SCHED_ T E X T
LOCK_ T E X T
2005-09-07 02:19:27 +04:00
KPROBES_ T E X T
2005-04-17 02:20:36 +04:00
* ( .fixup )
* ( .gnu .warning )
} = 0 x9 0 9 0
_ etext = . ; /* End of text section */
. = ALIGN( 1 6 ) ; /* Exception table */
_ _ start_ _ _ e x _ t a b l e = . ;
2005-06-26 01:57:47 +04:00
_ _ ex_ t a b l e : A T ( A D D R ( _ _ e x _ t a b l e ) - L O A D _ O F F S E T ) { * ( _ _ e x _ t a b l e ) }
2005-04-17 02:20:36 +04:00
_ _ stop_ _ _ e x _ t a b l e = . ;
RODATA
/* writeable */
2005-06-26 01:57:47 +04:00
.data : AT( A D D R ( . d a t a ) - L O A D _ O F F S E T ) { / * D a t a * /
2005-04-17 02:20:36 +04:00
* ( .data )
CONSTRUCTORS
}
. = ALIGN( 4 0 9 6 ) ;
_ _ nosave_ b e g i n = . ;
2005-06-26 01:57:47 +04:00
.data_nosave : AT( A D D R ( . d a t a _ n o s a v e ) - L O A D _ O F F S E T ) { * ( . d a t a . n o s a v e ) }
2005-04-17 02:20:36 +04:00
. = ALIGN( 4 0 9 6 ) ;
_ _ nosave_ e n d = . ;
. = ALIGN( 4 0 9 6 ) ;
2005-06-26 01:57:47 +04:00
.data .page_aligned : AT( A D D R ( . d a t a . p a g e _ a l i g n e d ) - L O A D _ O F F S E T ) {
* ( .data .idt )
}
2005-04-17 02:20:36 +04:00
. = ALIGN( 3 2 ) ;
2005-06-26 01:57:47 +04:00
.data .cacheline_aligned : AT( A D D R ( . d a t a . c a c h e l i n e _ a l i g n e d ) - L O A D _ O F F S E T ) {
* ( .data .cacheline_aligned )
}
2005-04-17 02:20:36 +04:00
2005-07-08 04:56:59 +04:00
/* rarely changed data like cpu maps */
. = ALIGN( 3 2 ) ;
.data .read_mostly : AT( A D D R ( . d a t a . r e a d _ m o s t l y ) - L O A D _ O F F S E T ) { * ( . d a t a . r e a d _ m o s t l y ) }
2005-04-17 02:20:36 +04:00
_ edata = . ; /* End of data section */
. = ALIGN( T H R E A D _ S I Z E ) ; /* init_task */
2005-06-26 01:57:47 +04:00
.data .init_task : AT( A D D R ( . d a t a . i n i t _ t a s k ) - L O A D _ O F F S E T ) {
* ( .data .init_task )
}
2005-04-17 02:20:36 +04:00
/* will be freed after init */
. = ALIGN( 4 0 9 6 ) ; /* Init code and data */
_ _ init_ b e g i n = . ;
2005-06-26 01:57:47 +04:00
.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 ) {
2005-04-17 02:20:36 +04:00
_ sinittext = . ;
* ( .init .text )
_ einittext = . ;
}
2005-06-26 01:57:47 +04:00
.init .data : AT( A D D R ( . i n i t . d a t a ) - L O A D _ O F F S E T ) { * ( . i n i t . d a t a ) }
2005-04-17 02:20:36 +04:00
. = ALIGN( 1 6 ) ;
_ _ setup_ s t a r t = . ;
2005-06-26 01:57:47 +04:00
.init .setup : AT( A D D R ( . i n i t . s e t u p ) - L O A D _ O F F S E T ) { * ( . i n i t . s e t u p ) }
2005-04-17 02:20:36 +04:00
_ _ setup_ e n d = . ;
_ _ initcall_ s t a r t = . ;
2005-06-26 01:57:47 +04:00
.initcall .init : AT( A D D R ( . i n i t c a l l . i n i t ) - L O A D _ O F F S E T ) {
2005-04-17 02:20:36 +04:00
* ( .initcall1 .init )
* ( .initcall2 .init )
* ( .initcall3 .init )
* ( .initcall4 .init )
* ( .initcall5 .init )
* ( .initcall6 .init )
* ( .initcall7 .init )
}
_ _ initcall_ e n d = . ;
_ _ con_ i n i t c a l l _ s t a r t = . ;
2005-06-26 01:57:47 +04:00
.con_initcall .init : AT( A D D R ( . c o n _ i n i t c a l l . i n i t ) - L O A D _ O F F S E T ) {
* ( .con_initcall .init )
}
2005-04-17 02:20:36 +04:00
_ _ con_ i n i t c a l l _ e n d = . ;
SECURITY_ I N I T
. = ALIGN( 4 ) ;
_ _ alt_ i n s t r u c t i o n s = . ;
2005-06-26 01:57:47 +04:00
.altinstructions : AT( A D D R ( . a l t i n s t r u c t i o n s ) - L O A D _ O F F S E T ) {
* ( .altinstructions )
}
2005-04-17 02:20:36 +04:00
_ _ alt_ i n s t r u c t i o n s _ e n d = . ;
2005-06-26 01:57:47 +04:00
.altinstr_replacement : AT( A D D R ( . a l t i n s t r _ r e p l a c e m e n t ) - L O A D _ O F F S E T ) {
* ( .altinstr_replacement )
}
2005-04-17 02:20:36 +04:00
/ * .exit .text is discard a t r u n t i m e , n o t l i n k t i m e , t o d e a l w i t h r e f e r e n c e s
from . a l t i n s t r u c t i o n s a n d . e h _ f r a m e * /
2005-06-26 01:57:47 +04:00
.exit .text : AT( A D D R ( . e x i t . t e x t ) - L O A D _ O F F S E T ) { * ( . e x i t . t e x t ) }
.exit .data : AT( A D D R ( . e x i t . d a t a ) - L O A D _ O F F S E T ) { * ( . e x i t . d a t a ) }
2005-04-17 02:20:36 +04:00
. = ALIGN( 4 0 9 6 ) ;
_ _ initramfs_ s t a r t = . ;
2005-06-26 01:57:47 +04:00
.init .ramfs : AT( A D D R ( . i n i t . r a m f s ) - L O A D _ O F F S E T ) { * ( . i n i t . r a m f s ) }
2005-04-17 02:20:36 +04:00
_ _ initramfs_ e n d = . ;
. = ALIGN( 3 2 ) ;
_ _ per_ c p u _ s t a r t = . ;
2005-06-26 01:57:47 +04:00
.data .percpu : AT( A D D R ( . d a t a . p e r c p u ) - L O A D _ O F F S E T ) { * ( . d a t a . p e r c p u ) }
2005-04-17 02:20:36 +04:00
_ _ per_ c p u _ e n d = . ;
. = ALIGN( 4 0 9 6 ) ;
_ _ init_ e n d = . ;
/* freed after init ends here */
_ _ bss_ s t a r t = . ; /* BSS */
2005-06-26 01:57:47 +04:00
.bss .page_aligned : AT( A D D R ( . b s s . p a g e _ a l i g n e d ) - L O A D _ O F F S E T ) {
2005-04-17 02:20:36 +04:00
* ( .bss .page_aligned )
2005-06-26 01:57:47 +04:00
}
.bss : AT( A D D R ( . b s s ) - L O A D _ O F F S E T ) {
2005-04-17 02:20:36 +04:00
* ( .bss )
}
. = ALIGN( 4 ) ;
_ _ bss_ s t o p = . ;
_ end = . ;
/* This is where the kernel creates the early boot page tables */
. = ALIGN( 4 0 9 6 ) ;
pg0 = . ;
/* Sections to be discarded */
/ DISCARD/ : {
* ( .exitcall .exit )
}
/* Stabs debugging sections. */
.stab 0 : { * ( .stab ) }
.stabstr 0 : { * ( .stabstr ) }
.stab .excl 0 : { * ( .stab .excl ) }
.stab .exclstr 0 : { * ( .stab .exclstr ) }
.stab .index 0 : { * ( .stab .index ) }
.stab .indexstr 0 : { * ( .stab .indexstr ) }
.comment 0 : { * ( .comment ) }
}