2005-04-17 02:20:36 +04:00
/ * Kernel l i n k l a y o u t f o r v a r i o u s " s e c t i o n s "
*
* Copyright ( C ) 1 9 9 9 - 2 0 0 3 M a t t h e w W i l c o x < w i l l y a t p a r i s c - l i n u x . o r g >
* Copyright ( C ) 2 0 0 0 - 2 0 0 3 P a u l B a m e < b a m e a t p a r i s c - l i n u x . o r g >
* Copyright ( C ) 2 0 0 0 J o h n M a r v i n < j s m a t p a r i s c - l i n u x . o r g >
* Copyright ( C ) 2 0 0 0 M i c h a e l A n g < m a n g w i t h s u b c a r r i e r . o r g >
* Copyright ( C ) 2 0 0 2 R a n d o l p h C h u n g < t a u s q w i t h p a r i s c - l i n u x . o r g >
* Copyright ( C ) 2 0 0 3 J a m e s B o t t o m l e y < j e j b w i t h p a r i s c - l i n u x . o r g >
2006-04-21 00:40:23 +04:00
* Copyright ( C ) 2 0 0 6 H e l g e D e l l e r < d e l l e r @gmx.de>
2005-04-17 02:20:36 +04:00
*
*
* This p r o g r a m i s f r e e s o f t w a r e ; you can redistribute it and/or modify
* it u n d e r t h e t e r m s o f t h e G N U G e n e r a l P u b l i c L i c e n s e a s p u b l i s h e d b y
* the F r e e S o f t w a r e F o u n d a t i o n ; either version 2 of the License, or
* ( at y o u r o p t i o n ) a n y l a t e r v e r s i o n .
*
* This p r o g r a m i s d i s t r i b u t e d i n t h e h o p e t h a t i t w i l l b e u s e f u l ,
* but W I T H O U T A N Y W A R R A N T Y ; without even the implied warranty of
* MERCHANTABILITY o r F I T N E S S F O R A P A R T I C U L A R P U R P O S E . S e e t h e
* GNU G e n e r a l P u b l i c L i c e n s e f o r m o r e d e t a i l s .
*
* You s h o u l d h a v e r e c e i v e d a c o p y o f t h e G N U G e n e r a l P u b l i c L i c e n s e
* along w i t h t h i s p r o g r a m ; if not, write to the Free Software
* Foundation, I n c . , 5 9 T e m p l e P l a c e , S u i t e 3 3 0 , B o s t o n , M A 0 2 1 1 1 - 1 3 0 7 U S A
* /
# include < a s m - g e n e r i c / v m l i n u x . l d s . h >
/* needed for the processor specific cache alignment size */
# include < a s m / c a c h e . h >
# include < a s m / p a g e . h >
2006-04-21 00:40:23 +04:00
# include < a s m / a s m - o f f s e t s . h >
2005-04-17 02:20:36 +04:00
/* ld script to make hppa Linux kernel */
# ifndef C O N F I G _ 6 4 B I T
OUTPUT_ F O R M A T ( " e l f32 - h p p a - l i n u x " )
OUTPUT_ A R C H ( h p p a )
# else
OUTPUT_ F O R M A T ( " e l f64 - h p p a - l i n u x " )
OUTPUT_ A R C H ( h p p a : h p p a2 . 0 w )
# endif
ENTRY( _ s t e x t )
# ifndef C O N F I G _ 6 4 B I T
jiffies = j i f f i e s _ 6 4 + 4 ;
# else
jiffies = j i f f i e s _ 6 4 ;
# endif
SECTIONS
{
2007-10-18 11:04:25 +04:00
. = KERNEL_ B I N A R Y _ T E X T _ S T A R T ;
2005-04-17 02:20:36 +04:00
2007-10-18 11:04:25 +04:00
_ text = . ; /* Text and read-only data */
.text ALIGN( 1 6 ) : {
2008-05-22 22:38:26 +04:00
HEAD_ T E X T
2007-10-18 11:04:25 +04:00
TEXT_ T E X T
SCHED_ T E X T
LOCK_ T E X T
* ( .text .do_softirq )
* ( .text .sys_exit )
* ( .text .do_sigaltstack )
* ( .text .do_fork )
* ( .text . * )
* ( .fixup )
* ( .lock .text ) /* out-of-line lock text */
* ( .gnu .warning )
2005-04-17 02:20:36 +04:00
} = 0
2007-10-18 11:04:25 +04:00
/* End of text section */
_ etext = . ;
2005-04-17 02:20:36 +04:00
2007-10-18 11:04:25 +04:00
RODATA
2005-04-17 02:20:36 +04:00
2007-10-18 11:04:25 +04:00
/* writeable */
/ * Make s u r e t h i s i s p a g e a l i g n e d s o
* that w e c a n p r o p e r l y l e a v e t h e s e
* as w r i t a b l e
* /
2007-10-18 11:04:34 +04:00
. = ALIGN( P A G E _ S I Z E ) ;
2007-10-18 11:04:25 +04:00
data_ s t a r t = . ;
. = 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 = . ;
}
2005-04-17 02:20:36 +04:00
2007-10-18 11:04:25 +04:00
NOTES
2007-08-27 07:28:34 +04:00
2007-10-18 11:04:25 +04:00
/* unwind info */
.PARISC .unwind : {
_ _ start_ _ _ u n w i n d = . ;
* ( .PARISC .unwind )
_ _ stop_ _ _ u n w i n d = . ;
}
2006-04-21 00:40:23 +04:00
2007-10-18 11:04:25 +04:00
/* rarely changed data like cpu maps */
. = ALIGN( 1 6 ) ;
.data .read_mostly : {
* ( .data .read_mostly )
}
2006-04-21 00:40:23 +04:00
2007-10-18 11:04:25 +04:00
. = ALIGN( L 1 _ C A C H E _ B Y T E S ) ;
/* Data */
.data : {
DATA_ D A T A
CONSTRUCTORS
2005-04-17 02:20:36 +04:00
}
2007-10-18 11:04:25 +04:00
. = ALIGN( L 1 _ C A C H E _ B Y T E S ) ;
.data .cacheline_aligned : {
* ( .data .cacheline_aligned )
}
2005-04-17 02:20:36 +04:00
2007-10-18 11:04:25 +04:00
/* PA-RISC locks requires 16-byte alignment */
. = ALIGN( 1 6 ) ;
.data .lock_aligned : {
* ( .data .lock_aligned )
}
2005-04-17 02:20:36 +04:00
2007-10-18 11:04:25 +04:00
/ * nosave d a t a i s r e a l l y o n l y u s e d f o r s o f t w a r e s u s p e n d . . . i t ' s h e r e
* just i n c a s e w e e v e r i m p l e m e n t i t
* /
2007-10-18 11:04:34 +04:00
. = ALIGN( P A G E _ S I Z E ) ;
2007-10-18 11:04:25 +04:00
_ _ nosave_ b e g i n = . ;
.data_nosave : {
* ( .data .nosave )
}
2007-10-18 11:04:34 +04:00
. = ALIGN( P A G E _ S I Z E ) ;
2007-10-18 11:04:25 +04:00
_ _ nosave_ e n d = . ;
2006-01-11 04:35:03 +03:00
2007-10-18 11:04:25 +04:00
/* End of data section */
_ edata = . ;
2005-04-17 02:20:36 +04:00
2007-10-18 11:04:25 +04:00
/* BSS */
_ _ bss_ s t a r t = . ;
/* page table entries need to be PAGE_SIZE aligned */
2007-10-18 11:04:34 +04:00
. = ALIGN( P A G E _ S I Z E ) ;
2007-10-18 11:04:25 +04:00
.data .vmpages : {
* ( .data .vm0 .pmd )
* ( .data .vm0 .pgd )
* ( .data .vm0 .pte )
}
.bss : {
* ( .bss )
* ( COMMON)
2006-04-21 00:40:23 +04:00
}
2007-10-18 11:04:25 +04:00
_ _ bss_ s t o p = . ;
2006-04-21 00:40:23 +04:00
2007-10-18 11:04:25 +04:00
/* assembler code expects init_task to be 16k aligned */
. = ALIGN( 1 6 3 8 4 ) ;
/* init_task */
.data .init_task : {
* ( .data .init_task )
}
2005-04-17 02:20:36 +04:00
# ifdef C O N F I G _ 6 4 B I T
2007-10-18 11:04:25 +04:00
. = ALIGN( 1 6 ) ;
/* Linkage tables */
.opd : {
* ( .opd )
} PROVIDE ( _ _ g p = . ) ;
.plt : {
* ( .plt )
}
.dlt : {
* ( .dlt )
}
2005-04-17 02:20:36 +04:00
# endif
2007-10-18 11:04:25 +04:00
/* reserve space for interrupt stack by aligning __init* to 16k */
. = ALIGN( 1 6 3 8 4 ) ;
_ _ init_ b e g i n = . ;
.init .text : {
_ sinittext = . ;
2008-01-20 16:15:03 +03:00
INIT_ T E X T
2007-10-18 11:04:25 +04:00
_ einittext = . ;
}
.init .data : {
2008-01-20 16:15:03 +03:00
INIT_ D A T A
2007-10-18 11:04:25 +04: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
/ * alternate i n s t r u c t i o n r e p l a c e m e n t . T h i s i s a m e c h a n i s m x86 u s e s
* to d e t e c t t h e C P U t y p e a n d r e p l a c e g e n e r i c i n s t r u c t i o n s e q u e n c e s
* with C P U s p e c i f i c o n e s . W e d o n ' t c u r r e n t l y d o t h i s i n P A , b u t
* it s e e m s l i k e a g o o d i d e a . . .
* /
. = ALIGN( 4 ) ;
.altinstructions : {
_ _ alt_ i n s t r u c t i o n s = . ;
* ( .altinstructions )
_ _ alt_ i n s t r u c t i o n s _ e n d = . ;
}
.altinstr_replacement : {
* ( .altinstr_replacement )
}
/ * .exit .text is discard 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 r e f e r e n c e s
* from . a l t i n s t r u c t i o n s a n d . e h _ f r a m e
* /
.exit .text : {
2008-01-20 16:15:03 +03:00
EXIT_ T E X T
2007-10-18 11:04:25 +04:00
}
.exit .data : {
2008-01-20 16:15:03 +03:00
EXIT_ D A T A
2007-10-18 11:04:25 +04:00
}
2007-02-10 12:44:44 +03:00
# ifdef C O N F I G _ B L K _ D E V _ I N I T R D
2007-10-18 11:04:34 +04:00
. = ALIGN( P A G E _ S I Z E ) ;
2007-10-18 11:04:25 +04:00
.init .ramfs : {
_ _ initramfs_ s t a r t = . ;
* ( .init .ramfs )
_ _ initramfs_ e n d = . ;
}
2007-02-10 12:44:44 +03:00
# endif
2007-07-19 12:48:12 +04:00
2007-10-18 11:04:34 +04:00
PERCPU( P A G E _ S I Z E )
. = ALIGN( P A G E _ S I Z E ) ;
2007-10-18 11:04:25 +04:00
_ _ init_ e n d = . ;
/* freed after init ends here */
_ end = . ;
2007-07-19 12:48:12 +04:00
2007-10-18 11:04:25 +04:00
/* Sections to be discarded */
/ DISCARD/ : {
* ( .exitcall .exit )
2005-04-17 02:20:36 +04:00
# ifdef C O N F I G _ 6 4 B I T
2007-10-18 11:04:25 +04:00
/ * temporary h a c k u n t i l b i n u t i l s i s f i x e d t o n o t e m i t t h e s e
* for s t a t i c b i n a r i e s
* /
* ( .interp )
* ( .dynsym )
* ( .dynstr )
* ( .dynamic )
* ( .hash )
* ( .gnu .hash )
2005-04-17 02:20:36 +04:00
# endif
}
2007-10-18 11:04:25 +04:00
STABS_ D E B U G
.note 0 : { * ( .note ) }
2005-04-17 02:20:36 +04:00
}