2007-11-11 17:58:11 +09:00
/ *
* ld s c r i p t t o m a k e S u p e r H L i n u x k e r n e l
* Written b y N i i b e Y u t a k a
* /
# include < a s m / t h r e a d _ i n f o . h >
# include < a s m / c a c h e . h >
# include < a s m - g e n e r i c / v m l i n u x . l d s . h >
# ifdef C O N F I G _ C P U _ L I T T L E _ E N D I A N
OUTPUT_ F O R M A T ( " e l f32 - s h - l i n u x " , " e l f32 - s h - l i n u x " , " e l f32 - s h - l i n u x " )
# else
OUTPUT_ F O R M A T ( " e l f32 - s h b i g - l i n u x " , " e l f32 - s h b i g - l i n u x " , " e l f32 - s h b i g - l i n u x " )
# endif
OUTPUT_ A R C H ( s h )
ENTRY( _ s t a r t )
SECTIONS
{
2007-11-30 17:52:53 +09:00
# ifdef C O N F I G _ 3 2 B I T
. = CONFIG_ P A G E _ O F F S E T + C O N F I G _ Z E R O _ P A G E _ O F F S E T ;
# else
2007-11-11 17:58:11 +09:00
. = CONFIG_ P A G E _ O F F S E T + C O N F I G _ M E M O R Y _ S T A R T + C O N F I G _ Z E R O _ P A G E _ O F F S E T ;
2007-11-30 17:52:53 +09:00
# endif
2007-11-11 17:58:11 +09:00
_ text = . ; /* Text and read-only data */
.empty_zero_page : {
* ( .empty_zero_page )
} = 0
.text : {
* ( .text .head )
TEXT_ T E X T
SCHED_ T E X T
LOCK_ T E X T
KPROBES_ T E X T
* ( .fixup )
* ( .gnu .warning )
} = 0 x0 0 0 9
. = ALIGN( 1 6 ) ; /* 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 = . ;
_ etext = . ; /* End of text section */
BUG_ T A B L E
NOTES
RO_ D A T A ( P A G E _ S I Z E )
2007-11-30 17:06:36 +09:00
/ *
* Code w h i c h m u s t b e e x e c u t e d u n c a c h e d a n d t h e a s s o c i a t e d d a t a
* /
. = ALIGN( P A G E _ S I Z E ) ;
_ _ uncached_ s t a r t = . ;
.uncached .text : { * ( .uncached .text ) }
.uncached .data : { * ( .uncached .data ) }
_ _ uncached_ e n d = . ;
2007-11-11 17:58:11 +09:00
. = ALIGN( T H R E A D _ S I Z E ) ;
.data : { /* Data */
* ( .data .init_task )
. = ALIGN( L 1 _ C A C H E _ B Y T E S ) ;
* ( .data .cacheline_aligned )
. = ALIGN( L 1 _ C A C H E _ B Y T E S ) ;
* ( .data .read_mostly )
. = ALIGN( P A G E _ S I Z E ) ;
* ( .data .page_aligned )
_ _ nosave_ b e g i n = . ;
* ( .data .nosave )
. = ALIGN( P A G E _ S I Z E ) ;
_ _ nosave_ e n d = . ;
DATA_ D A T A
CONSTRUCTORS
}
_ edata = . ; /* End of data section */
. = ALIGN( P A G E _ S I Z E ) ; /* Init code and data */
_ _ init_ b e g i n = . ;
_ sinittext = . ;
2008-01-20 14:15:03 +01:00
.init .text : { INIT_ T E X T }
2007-11-11 17:58:11 +09:00
_ einittext = . ;
2008-01-20 14:15:03 +01:00
.init .data : { INIT_ D A T A }
2007-11-11 17:58:11 +09:00
. = ALIGN( 1 6 ) ;
_ _ setup_ s t a r t = . ;
.init .setup : { * ( .init .setup ) }
_ _ setup_ e n d = . ;
_ _ initcall_ s t a r t = . ;
.initcall .init : {
INITCALLS
}
_ _ initcall_ e n d = . ;
_ _ con_ i n i t c a l l _ s t a r t = . ;
.con_initcall .init : { * ( .con_initcall .init ) }
_ _ con_ i n i t c a l l _ e n d = . ;
SECURITY_ I N I T
# ifdef C O N F I G _ B L K _ D E V _ I N I T R D
. = ALIGN( P A G E _ S I Z E ) ;
_ _ initramfs_ s t a r t = . ;
.init .ramfs : { * ( .init .ramfs ) }
_ _ initramfs_ e n d = . ;
# endif
. = ALIGN( 4 ) ;
_ _ machvec_ s t a r t = . ;
.machvec .init : { * ( .machvec .init ) }
_ _ machvec_ e n d = . ;
PERCPU( P A G E _ S I Z E )
/ *
* .exit .text is discarded 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
* references f r o m _ _ b u g _ t a b l e
* /
2008-01-20 14:15:03 +01:00
.exit .text : { EXIT_ T E X T }
.exit .data : { EXIT_ D A T A }
2007-11-11 17:58:11 +09:00
. = ALIGN( P A G E _ S I Z E ) ;
.bss : {
_ _ init_ e n d = . ;
_ _ bss_ s t a r t = . ; /* BSS */
* ( .bss .page_aligned )
* ( .bss )
* ( COMMON)
. = ALIGN( 4 ) ;
_ ebss = . ; /* uClinux MTD sucks */
_ end = . ;
}
/ *
* When s o m e t h i n g i n t h e k e r n e l i s N O T c o m p i l e d a s a m o d u l e , t h e
* module c l e a n u p c o d e a n d d a t a a r e p u t i n t o t h e s e s e g m e n t s . B o t h
* can t h e n b e t h r o w n a w a y , a s c l e a n u p c o d e i s n e v e r c a l l e d u n l e s s
* it' s a m o d u l e .
* /
/ DISCARD/ : {
* ( .exitcall .exit )
}
STABS_ D E B U G
DWARF_ D E B U G
}