2005-04-16 15:20:36 -07:00
/ * ld s c r i p t t o m a k e F R V 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>;
* /
OUTPUT_ F O R M A T ( " e l f32 - f r v " , " e l f32 - f r v " , " e l f32 - f r v " )
OUTPUT_ A R C H ( f r v )
ENTRY( _ s t a r t )
# 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 / p r o c e s s o r . 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 >
jiffies = j i f f i e s _ 6 4 + 4 ;
_ _ page_ o f f s e t = 0 x c00 0 0 0 0 0 ; /* start of area covered by struct pages */
_ _ kernel_ i m a g e _ s t a r t = _ _ p a g e _ o f f s e t ; /* address at which kernel image resides */
SECTIONS
{
. = _ _ kernel_ i m a g e _ s t a r t ;
/* discardable initialisation code and data */
. = ALIGN( P A G E _ S I Z E ) ; /* Init code and data */
_ _ init_ b e g i n = . ;
_ sinittext = . ;
.init .text : {
* ( .text .head )
# ifndef C O N F I G _ D E B U G _ I N F O
* ( .init .text )
* ( .exit .text )
* ( .exit .data )
* ( .exitcall .exit )
# endif
}
_ einittext = . ;
.init .data : { * ( .init .data ) }
. = ALIGN( 8 ) ;
_ _ setup_ s t a r t = . ;
.setup .init : { KEEP( * ( . i n i t . s e t u p ) ) }
_ _ setup_ e n d = . ;
_ _ initcall_ s t a r t = . ;
.initcall .init : {
2006-10-27 11:41:44 -07:00
INITCALLS
2005-04-16 15:20:36 -07:00
}
_ _ 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
. = ALIGN( 4 ) ;
_ _ alt_ i n s t r u c t i o n s = . ;
.altinstructions : { * ( .altinstructions ) }
_ _ alt_ i n s t r u c t i o n s _ e n d = . ;
.altinstr_replacement : { * ( .altinstr_replacement ) }
2007-05-02 19:27:12 +02:00
. = ALIGN( 4 0 9 6 ) ;
2005-04-16 15:20:36 -07:00
_ _ per_ c p u _ s t a r t = . ;
.data .percpu : { * ( .data .percpu ) }
_ _ per_ c p u _ e n d = . ;
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
. = ALIGN( 4 0 9 6 ) ;
_ _ initramfs_ s t a r t = . ;
.init .ramfs : { * ( .init .ramfs ) }
_ _ initramfs_ e n d = . ;
2007-02-10 01:44:44 -08:00
# endif
2005-04-16 15:20:36 -07:00
. = ALIGN( T H R E A D _ S I Z E ) ;
_ _ init_ e n d = . ;
/* put sections together that have massive alignment issues */
. = ALIGN( T H R E A D _ S I Z E ) ;
.data .init_task : {
/* init task record & stack */
* ( .data .init_task )
}
.trap : {
/* trap table management - read entry-table.S before modifying */
. = ALIGN( 8 1 9 2 ) ;
_ _ trap_ t a b l e s = . ;
* ( .trap .user )
* ( .trap .kernel )
. = ALIGN( 4 0 9 6 ) ;
* ( .trap .break )
}
. = ALIGN( 4 0 9 6 ) ;
.data .page_aligned : { * ( .data .idt ) }
. = ALIGN( L 1 _ C A C H E _ B Y T E S ) ;
.data .cacheline_aligned : { * ( .data .cacheline_aligned ) }
/* Text and read-only data */
. = ALIGN( 4 ) ;
_ text = . ;
_ stext = . ;
.text : {
* (
2007-05-13 00:31:33 +02:00
.text .start .text . *
2005-04-16 15:20:36 -07:00
# ifdef C O N F I G _ D E B U G _ I N F O
.init .text
.exit .text
.exitcall .exit
# endif
)
2007-05-13 00:31:33 +02:00
TEXT_ T E X T
2005-04-16 15:20:36 -07:00
SCHED_ T E X T
2006-01-08 01:01:25 -08:00
LOCK_ T E X T
2005-04-16 15:20:36 -07:00
* ( .fixup )
* ( .gnu .warning )
* ( .exitcall .exit )
} = 0 x9 0 9 0
_ etext = . ; /* End of text section */
RODATA
.rodata : {
* ( .trap .vector )
/* this clause must not be modified - the ordering and adjacency are imperative */
_ _ trap_ f i x u p _ t a b l e s = . ;
* ( .trap .fixup .user .trap .fixup .kernel )
}
. = ALIGN( 8 ) ; /* Exception table */
_ _ start_ _ _ e x _ t a b l e = . ;
_ _ ex_ t a b l e : { K E E P ( * ( _ _ e x _ t a b l e ) ) }
_ _ stop_ _ _ e x _ t a b l e = . ;
_ sdata = . ;
.data : { /* Data */
2007-05-17 13:38:44 +02:00
DATA_ D A T A
* ( .data . * )
2005-04-16 15:20:36 -07:00
* ( .exit .data )
CONSTRUCTORS
}
_ edata = . ; /* End of data section */
/* GP section */
. = ALIGN( L 1 _ C A C H E _ B Y T E S ) ;
_ gp = . + 2 0 4 8 ;
PROVIDE ( g p = _ g p ) ;
.sdata : { * ( .sdata .sdata . * ) }
/* BSS */
. = ALIGN( L 1 _ C A C H E _ B Y T E S ) ;
_ _ bss_ s t a r t = . ;
.sbss : { * ( .sbss .sbss . * ) }
.bss : { * ( .bss .bss . * ) }
.bss .stack : { * ( .bss ) }
_ _ bss_ s t o p = . ;
_ end = . ;
. = ALIGN( P A G E _ S I Z E ) ;
_ _ kernel_ i m a g e _ e n d = . ;
/* 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 ) }
.debug_line 0 : { * ( .debug_line ) }
.debug_info 0 : { * ( .debug_info ) }
.debug_abbrev 0 : { * ( .debug_abbrev ) }
.debug_aranges 0 : { * ( .debug_aranges ) }
.debug_frame 0 : { * ( .debug_frame ) }
.debug_pubnames 0 : { * ( .debug_pubnames ) }
.debug_str 0 : { * ( .debug_str ) }
.debug_ranges 0 : { * ( .debug_ranges ) }
.comment 0 : { * ( .comment ) }
}
_ _ kernel_ i m a g e _ s i z e _ n o _ b s s = _ _ b s s _ s t a r t - _ _ k e r n e l _ i m a g e _ s t a r t ;