2005-04-16 15:20:36 -07:00
/ * ld s c r i p t t o m a k e t h e L i n u x / C R I S k e r n e l
* Authors : Bjorn W e s e n ( b j o r n w @axis.com)
*
* It i s V E R Y D A N G E R O U S t o f i d d l e a r o u n d w i t h t h e s y m b o l s i n t h i s
* script. I t i s f o r e x a m p l e q u i t e v i t a l t h a t a l l g e n e r a t e d s e c t i o n s
* that a r e u s e d a r e a c t u a l l y n a m e d h e r e , o t h e r w i s e t h e l i n k e r w i l l
* put t h e m a t t h e e n d , w h e r e t h e i n i t s t u f f i s w h i c h i s F R E E D a f t e r
* the k e r n e l h a s b o o t e d .
* /
# include < a s m - g e n e r i c / v m l i n u x . l d s . h >
2008-01-17 15:21:11 -08:00
# include < a s m / p a g e . h >
2005-04-16 15:20:36 -07:00
jiffies = j i f f i e s _ 6 4 ;
SECTIONS
{
. = DRAM_ V I R T U A L _ B A S E ;
dram_ s t a r t = . ;
ibr_ s t a r t = . ;
. = . + 0 x4 0 0 0 ; /* see head.S and pages reserved at the start */
_ text = . ; /* Text and read-only data */
text_ s t a r t = . ; /* lots of aliases */
_ stext = . ;
_ _ stext = . ;
.text : {
2008-01-17 15:21:11 -08:00
TEXT_ T E X T
2005-04-16 15:20:36 -07:00
SCHED_ T E X T
LOCK_ T E X T
* ( .fixup )
* ( .text .__ * )
}
_ etext = . ; /* End of text section */
_ _ etext = . ;
. = ALIGN( 4 ) ; /* Exception table */
_ _ start_ _ _ e x _ t a b l e = . ;
_ _ ex_ t a b l e : { * ( _ _ e x _ t a b l e ) }
_ _ stop_ _ _ e x _ t a b l e = . ;
RODATA
. = ALIGN ( 4 ) ;
_ _ _ data_ s t a r t = . ;
_ _ Sdata = . ;
.data : { /* Data */
2007-06-16 22:28:26 -04:00
DATA_ D A T A
2005-04-16 15:20:36 -07:00
}
_ _ edata = . ; /* End of data section */
_ edata = . ;
2008-01-17 15:21:11 -08:00
. = ALIGN( P A G E _ S I Z E ) ; /* init_task and stack, must be aligned */
2005-04-16 15:20:36 -07:00
.data .init_task : { * ( .data .init_task ) }
2008-01-17 15:21:11 -08:00
. = ALIGN( P A G E _ S I Z E ) ; /* Init code and data */
2005-04-16 15:20:36 -07:00
_ _ init_ b e g i n = . ;
.init .text : {
_ sinittext = . ;
2008-01-20 14:15:03 +01:00
INIT_ T E X T
2005-04-16 15:20:36 -07:00
_ einittext = . ;
}
2008-01-20 14:15:03 +01:00
.init .data : { INIT_ D A T A }
2005-04-16 15:20:36 -07:00
. = ALIGN( 1 6 ) ;
_ _ setup_ s t a r t = . ;
.init .setup : { * ( .init .setup ) }
_ _ setup_ e n d = . ;
.initcall .init : {
_ _ initcall_ s t a r t = . ;
2008-01-17 15:21:11 -08:00
INITCALLS
2005-04-16 15:20:36 -07:00
_ _ initcall_ e n d = . ;
}
.con_initcall .init : {
_ _ con_ i n i t c a l l _ s t a r t = . ;
* ( .con_initcall .init )
_ _ con_ i n i t c a l l _ e n d = . ;
}
SECURITY_ I N I T
2007-02-10 01:44:44 -08:00
# ifdef C O N F I G _ B L K _ D E V _ I N I T R D
2005-04-16 15:20:36 -07:00
.init .ramfs : {
_ _ initramfs_ s t a r t = . ;
* ( .init .ramfs )
_ _ initramfs_ e n d = . ;
}
2007-02-10 01:44:44 -08:00
# endif
2005-04-16 15:20:36 -07:00
_ _ vmlinux_ e n d = . ; /* last address of the physical file */
2008-01-17 15:21:11 -08:00
/ *
* We f i l l t o t h e n e x t p a g e , s o w e c a n d i s c a r d a l l i n i t
* pages w i t h o u t n e e d i n g t o c o n s i d e r w h a t p a y l o a d m i g h t b e
* appended t o t h e k e r n e l i m a g e .
* /
. = ALIGN( P A G E _ S I Z E ) ;
_ _ init_ e n d = . ;
2005-04-16 15:20:36 -07:00
_ _ data_ e n d = . ; /* Move to _edata ? */
_ _ bss_ s t a r t = . ; /* BSS */
.bss : {
* ( COMMON)
* ( .bss )
}
. = ALIGN ( 0 x20 ) ;
_ end = . ;
_ _ end = . ;
/* Sections to be discarded */
/ DISCARD/ : {
2008-01-20 14:15:03 +01:00
EXIT_ T E X T
EXIT_ D A T A
2005-04-16 15:20:36 -07:00
* ( .exitcall .exit )
}
dram_ e n d = d r a m _ s t a r t + C O N F I G _ E T R A X _ D R A M _ S I Z E * 1 0 2 4 * 1 0 2 4 ;
}