2006-02-02 14:31:16 +00:00
# include < a s m / a s m - o f f s e t s . 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-04-05 09:45:45 +01:00
# undef m i p s
2005-04-16 15:20:36 -07:00
# define m i p s m i p s
OUTPUT_ A R C H ( m i p s )
ENTRY( k e r n e l _ e n t r y )
2007-10-14 22:49:01 +01:00
PHDRS {
text P T _ L O A D F L A G S ( 7 ) ; /* RWX */
note P T _ N O T E F L A G S ( 4 ) ; /* R__ */
}
2005-04-16 15:20:36 -07:00
jiffies = J I F F I E S ;
2007-09-15 23:35:53 +02:00
2005-04-16 15:20:36 -07:00
SECTIONS
{
# ifdef C O N F I G _ B O O T _ E L F 6 4
2007-09-15 23:35:53 +02:00
/* Read-only sections, merged into text segment: */
/* . = 0xc000000000000000; */
2005-04-16 15:20:36 -07:00
2007-09-15 23:35:53 +02:00
/* This is the value for an Origin kernel, taken from an IRIX kernel. */
/* . = 0xc00000000001c000; */
2005-04-16 15:20:36 -07:00
2007-09-15 23:35:53 +02:00
/ * Set t h e v a d d r f o r t h e t e x t s e g m e n t t o a v a l u e
* > = 0 xa8 0 0 0 0 0 0 0 0 0 1 9 0 0 0 i f n o s y m m o n i s g o i n g t o c o n f i g u r e d
* > = 0 xa8 0 0 0 0 0 0 0 0 3 0 0 0 0 0 o t h e r w i s e
* /
2005-04-16 15:20:36 -07:00
2007-09-15 23:35:53 +02:00
/* . = 0xa800000000300000; */
. = 0 xffffffff8 0 3 0 0 0 0 0 ;
2005-04-16 15:20:36 -07:00
# endif
2007-09-15 23:35:53 +02:00
. = LOADADDR;
/* read-only */
_ text = . ; /* Text and read-only data */
.text : {
TEXT_ T E X T
SCHED_ T E X T
LOCK_ T E X T
2007-10-14 22:50:05 +01:00
KPROBES_ T E X T
2008-08-05 23:45:14 +09:00
* ( .text . * )
2007-09-15 23:35:53 +02:00
* ( .fixup )
* ( .gnu .warning )
2007-10-14 22:49:01 +01:00
} : text = 0
2007-09-15 23:35:53 +02:00
_ etext = . ; /* End of text section */
/* Exception table */
. = ALIGN( 1 6 ) ;
_ _ 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 = . ;
}
/* Exception table for data bus errors */
_ _ dbe_ t a b l e : {
_ _ start_ _ _ d b e _ t a b l e = . ;
* ( _ _ dbe_ t a b l e )
_ _ stop_ _ _ d b e _ t a b l e = . ;
}
2007-10-14 22:49:01 +01:00
NOTES : t e x t : n o t e
.dummy : { * ( .dummy ) } : text
2007-09-15 23:35:53 +02:00
RODATA
/* writeable */
.data : { /* Data */
2007-10-18 23:12:32 +02:00
. = . + DATAOFFSET; /* for CONFIG_MAPPED_KERNEL */
/ *
* This A L I G N i s n e e d e d a s a w o r k a r o u n d f o r a b u g a
* gcc b u g u p t o 4 . 1 w h i c h l i m i t s t h e m a x i m u m a l i g n m e n t
* to a t m o s t 3 2 k B a n d r e s u l t s i n t h e f o l l o w i n g
* warning :
*
* CC a r c h / m i p s / k e r n e l / i n i t _ t a s k . o
* arch/ m i p s / k e r n e l / i n i t _ t a s k . c : 3 0 : w a r n i n g : a l i g n m e n t
* of ‘ i n i t _ t h r e a d _ u n i o n ’ i s g r e a t e r t h a n m a x i m u m
* object f i l e a l i g n m e n t . U s i n g 3 2 7 6 8
* /
. = ALIGN( _ P A G E _ S I Z E ) ;
* ( .data .init_task )
2007-09-15 23:35:53 +02:00
2007-10-18 23:12:32 +02:00
DATA_ D A T A
CONSTRUCTORS
2007-09-15 23:35:53 +02:00
}
_ gp = . + 0 x80 0 0 ;
.lit8 : {
* ( .lit8 )
}
.lit4 : {
* ( .lit4 )
}
/ * We w a n t t h e s m a l l d a t a s e c t i o n s t o g e t h e r , s o s i n g l e - i n s t r u c t i o n o f f s e t s
can a c c e s s t h e m a l l , a n d i n i t i a l i z e d d a t a a l l b e f o r e u n i n i t i a l i z e d , s o
we c a n s h o r t e n t h e o n - d i s k s e g m e n t s i z e . * /
.sdata : {
* ( .sdata )
}
. = ALIGN( _ P A G E _ S I Z E ) ;
.data_nosave : {
_ _ nosave_ b e g i n = . ;
* ( .data .nosave )
}
. = ALIGN( _ P A G E _ S I Z E ) ;
_ _ nosave_ e n d = . ;
2008-10-13 16:36:13 -07:00
. = ALIGN( 1 < < C O N F I G _ M I P S _ L 1 _ C A C H E _ S H I F T ) ;
2007-09-15 23:35:53 +02:00
.data .cacheline_aligned : {
* ( .data .cacheline_aligned )
}
_ edata = . ; /* End of data section */
/* will be freed after init */
. = ALIGN( _ P A G E _ S I Z E ) ; /* Init code and data */
_ _ init_ b e g i n = . ;
.init .text : {
_ sinittext = . ;
2008-01-20 14:15:03 +01:00
INIT_ T E X T
2007-09-15 23:35:53 +02:00
_ einittext = . ;
}
.init .data : {
2008-01-20 14:15:03 +01:00
INIT_ D A T A
2007-09-15 23:35:53 +02:00
}
. = ALIGN( 1 6 ) ;
.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
/ * .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 . r o d a t a
* /
.exit .text : {
2008-01-20 14:15:03 +01:00
EXIT_ T E X T
2007-09-15 23:35:53 +02:00
}
.exit .data : {
2008-01-20 14:15:03 +01:00
EXIT_ D A T A
2007-09-15 23:35:53 +02:00
}
2007-02-10 01:44:44 -08:00
# if d e f i n e d ( C O N F I G _ B L K _ D E V _ I N I T R D )
2007-09-15 23:35:53 +02:00
. = ALIGN( _ P A G E _ S I Z E ) ;
.init .ramfs : {
_ _ initramfs_ s t a r t = . ;
* ( .init .ramfs )
_ _ initramfs_ e n d = . ;
}
2007-02-10 01:44:44 -08:00
# endif
2007-09-15 23:35:53 +02:00
PERCPU( _ P A G E _ S I Z E )
. = ALIGN( _ P A G E _ S I Z E ) ;
_ _ init_ e n d = . ;
/* freed after init ends here */
_ _ bss_ s t a r t = . ; /* BSS */
.sbss : {
* ( .sbss )
* ( .scommon )
}
.bss : {
* ( .bss )
* ( COMMON)
}
_ _ bss_ s t o p = . ;
_ end = . ;
/* Sections to be discarded */
/ DISCARD/ : {
* ( .exitcall .exit )
/* ABI crap starts here */
* ( .MIPS .options )
* ( .options )
* ( .pdr )
* ( .reginfo )
}
/* These mark the ABI of the kernel for debuggers. */
.mdebug .abi32 : {
KEEP( * ( . m d e b u g . a b i 3 2 ) )
}
.mdebug .abi64 : {
KEEP( * ( . m d e b u g . a b i 6 4 ) )
}
/* This is the MIPS specific mdebug section. */
.mdebug : {
* ( .mdebug )
}
STABS_ D E B U G
DWARF_ D E B U G
/* These must appear regardless of . */
.gptab .sdata : {
* ( .gptab .data )
* ( .gptab .sdata )
}
.gptab .sbss : {
* ( .gptab .bss )
* ( .gptab .sbss )
}
2005-04-16 15:20:36 -07:00
}