2005-04-16 15:20:36 -07:00
/ * ld s c r i p t t o m a k e s39 0 L i n u x k e r n e l
* Written b y M a r t i n S c h w i d e f s k y ( s c h w i d e f s k y @de.ibm.com)
* /
2007-10-12 16:11:50 +02:00
# include < a s m / p a g e . h >
2005-04-16 15:20:36 -07:00
# include < a s m - g e n e r i c / v m l i n u x . l d s . h >
2006-01-06 00:19:28 -08:00
# ifndef C O N F I G _ 6 4 B I T
2005-04-16 15:20:36 -07:00
OUTPUT_ F O R M A T ( " e l f32 - s39 0 " , " e l f32 - s39 0 " , " e l f32 - s39 0 " )
OUTPUT_ A R C H ( s39 0 )
ENTRY( _ s t a r t )
jiffies = j i f f i e s _ 6 4 + 4 ;
# else
OUTPUT_ F O R M A T ( " e l f64 - s39 0 " , " e l f64 - s39 0 " , " e l f64 - s39 0 " )
OUTPUT_ A R C H ( s39 0 : 6 4 - b i t )
ENTRY( _ s t a r t )
jiffies = j i f f i e s _ 6 4 ;
# endif
2008-01-26 14:11:21 +01:00
PHDRS {
text P T _ L O A D F L A G S ( 5 ) ; /* R_E */
data P T _ L O A D F L A G S ( 7 ) ; /* RWE */
note P T _ N O T E F L A G S ( 0 ) ; /* ___ */
}
2005-04-16 15:20:36 -07:00
SECTIONS
{
2007-10-12 16:11:49 +02:00
. = 0 x0 0 0 0 0 0 0 0 ;
.text : {
_ text = . ; /* Text and read-only data */
* ( .text .head )
2007-05-13 00:31:33 +02:00
TEXT_ T E X T
2007-10-12 16:11:49 +02:00
SCHED_ T E X T
LOCK_ T E X T
KPROBES_ T E X T
* ( .fixup )
* ( .gnu .warning )
2008-02-05 16:50:38 +01:00
} : text = 0 x07 0 0
2005-04-16 15:20:36 -07:00
2007-10-12 16:11:49 +02:00
_ etext = . ; /* End of text section */
2005-04-16 15:20:36 -07:00
2008-01-26 14:11:21 +01:00
NOTES : t e x t : n o t e
BUG_ T A B L E : t e x t
2007-10-12 16:11:49 +02:00
RODATA
2005-04-16 15:20:36 -07:00
# ifdef C O N F I G _ S H A R E D _ K E R N E L
2007-10-12 16:11:50 +02:00
. = ALIGN( 0 x10 0 0 0 0 ) ; /* VM shared segments are 1MB aligned */
2007-02-05 21:18:41 +01:00
# endif
2005-04-16 15:20:36 -07:00
2007-10-12 16:11:50 +02:00
. = ALIGN( P A G E _ S I Z E ) ;
2007-10-12 16:11:49 +02:00
_ eshared = . ; /* End of shareable data */
. = ALIGN( 1 6 ) ; /* Exception table */
_ _ ex_ t a b l e : {
_ _ start_ _ _ e x _ t a b l e = . ;
* ( _ _ ex_ t a b l e )
_ _ stop_ _ _ e x _ t a b l e = . ;
}
.data : { /* Data */
DATA_ D A T A
CONSTRUCTORS
}
2007-10-12 16:11:50 +02:00
. = ALIGN( P A G E _ S I Z E ) ;
2007-10-12 16:11:49 +02:00
.data_nosave : {
_ _ nosave_ b e g i n = . ;
* ( .data .nosave )
}
2007-10-12 16:11:50 +02:00
. = ALIGN( P A G E _ S I Z E ) ;
2007-10-12 16:11:49 +02:00
_ _ nosave_ e n d = . ;
2007-10-12 16:11:50 +02:00
. = ALIGN( P A G E _ S I Z E ) ;
2007-10-12 16:11:49 +02:00
.data .page_aligned : {
* ( .data .idt )
}
2007-10-12 16:11:50 +02:00
. = ALIGN( 0 x10 0 ) ;
2007-10-12 16:11:49 +02:00
.data .cacheline_aligned : {
* ( .data .cacheline_aligned )
}
2007-10-12 16:11:50 +02:00
. = ALIGN( 0 x10 0 ) ;
2007-10-12 16:11:49 +02:00
.data .read_mostly : {
* ( .data .read_mostly )
}
_ edata = . ; /* End of data section */
2007-10-12 16:11:50 +02:00
. = ALIGN( 2 * P A G E _ S I Z E ) ; /* init_task */
2007-10-12 16:11:49 +02:00
.data .init_task : {
* ( .data .init_task )
}
/* will be freed after init */
2007-10-12 16:11:50 +02:00
. = ALIGN( P A G E _ S I Z E ) ; /* Init code and data */
2007-10-12 16:11:49 +02:00
_ _ init_ b e g i n = . ;
.init .text : {
_ sinittext = . ;
2008-01-20 14:15:03 +01:00
INIT_ T E X T
2007-10-12 16:11:49 +02:00
_ einittext = . ;
}
/ *
* .exit .text is discarded a t r u n t i m e , n o t l i n k t i m e ,
* to d e a l w i t h r e f e r e n c e s f r o m _ _ b u g _ t a b l e
* /
.exit .text : {
2008-01-20 14:15:03 +01:00
EXIT_ T E X T
2007-10-12 16:11:49 +02:00
}
.init .data : {
2008-01-20 14:15:03 +01:00
INIT_ D A T A
2007-10-12 16:11:49 +02:00
}
2007-10-12 16:11:50 +02:00
. = ALIGN( 0 x10 0 ) ;
2007-10-12 16:11:49 +02:00
.init .setup : {
_ _ setup_ s t a r t = . ;
* ( .init .setup )
_ _ setup_ e n d = . ;
}
.initcall .init : {
_ _ initcall_ s t a r t = . ;
INITCALLS
_ _ 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
2007-10-12 16:11:50 +02:00
. = ALIGN( 0 x10 0 ) ;
2007-10-12 16:11:49 +02:00
.init .ramfs : {
_ _ initramfs_ s t a r t = . ;
* ( .init .ramfs )
. = ALIGN( 2 ) ;
_ _ initramfs_ e n d = . ;
}
2007-02-10 01:44:44 -08:00
# endif
2007-10-12 16:11:49 +02:00
2007-10-12 16:11:50 +02:00
PERCPU( P A G E _ S I Z E )
. = ALIGN( P A G E _ S I Z E ) ;
2007-10-12 16:11:49 +02:00
_ _ init_ e n d = . ; /* freed after init ends here */
/* BSS */
.bss : {
_ _ bss_ s t a r t = . ;
* ( .bss )
. = ALIGN( 2 ) ;
_ _ bss_ s t o p = . ;
}
_ end = . ;
/* Sections to be discarded */
/ DISCARD/ : {
2008-01-20 14:15:03 +01:00
EXIT_ D A T A
2007-10-12 16:11:49 +02:00
* ( .exitcall .exit )
}
/* Debugging sections. */
STABS_ D E B U G
DWARF_ D E B U G
2005-04-16 15:20:36 -07:00
}