2012-04-20 14:45:54 +01:00
/ *
* ld s c r i p t t o m a k e A R M L i n u x k e r n e l
* taken f r o m t h e i 3 8 6 v e r s i o n b y R u s s e l l K i n g
* Written b y M a r t i n M a r e s < m j @atrey.karlin.mff.cuni.cz>
* /
# 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 / t h r e a d _ i n f o . h >
# include < a s m / m e m o r y . h >
# include < a s m / p a g e . h >
# define A R M _ E X I T _ K E E P ( x )
# define A R M _ E X I T _ D I S C A R D ( x ) x
OUTPUT_ A R C H ( a a r c h64 )
ENTRY( s t e x t )
jiffies = j i f f i e s _ 6 4 ;
2012-12-07 18:40:43 +00:00
# define H Y P E R V I S O R _ T E X T \
/ * \
* Force t h e a l i g n m e n t t o b e c o m p a t i b l e w i t h \
* the v e c t o r s r e q u i r e m e n t s \
* / \
. = ALIGN( 2 0 4 8 ) ; \
VMLINUX_ S Y M B O L ( _ _ h y p _ i d m a p _ t e x t _ s t a r t ) = . ; \
* ( .hyp .idmap .text ) \
VMLINUX_ S Y M B O L ( _ _ h y p _ i d m a p _ t e x t _ e n d ) = . ; \
VMLINUX_ S Y M B O L ( _ _ h y p _ t e x t _ s t a r t ) = . ; \
* ( .hyp .text ) \
VMLINUX_ S Y M B O L ( _ _ h y p _ t e x t _ e n d ) = . ;
2012-04-20 14:45:54 +01:00
SECTIONS
{
/ *
* XXX : The l i n k e r d o e s n o t d e f i n e h o w o u t p u t s e c t i o n s a r e
* assigned t o i n p u t s e c t i o n s w h e n t h e r e a r e m u l t i p l e s t a t e m e n t s
* matching t h e s a m e i n p u t s e c t i o n n a m e . T h e r e i s n o d o c u m e n t e d
* order o f m a t c h i n g .
* /
/ DISCARD/ : {
ARM_ E X I T _ D I S C A R D ( E X I T _ T E X T )
ARM_ E X I T _ D I S C A R D ( E X I T _ D A T A )
EXIT_ C A L L
* ( .discard )
* ( .discard . * )
}
. = PAGE_ O F F S E T + T E X T _ O F F S E T ;
.head .text : {
_ text = . ;
HEAD_ T E X T
}
.text : { /* Real text segment */
_ stext = . ; /* Text and read-only data */
_ _ exception_ t e x t _ s t a r t = . ;
* ( .exception .text )
_ _ exception_ t e x t _ e n d = . ;
IRQENTRY_ T E X T
TEXT_ T E X T
SCHED_ T E X T
LOCK_ T E X T
2012-12-07 18:40:43 +00:00
HYPERVISOR_ T E X T
2012-04-20 14:45:54 +01:00
* ( .fixup )
* ( .gnu .warning )
. = ALIGN( 1 6 ) ;
* ( .got ) /* Global offset table */
}
RO_ D A T A ( P A G E _ S I Z E )
2013-05-08 17:29:24 +01:00
EXCEPTION_ T A B L E ( 8 )
2013-08-23 16:16:42 +01:00
NOTES
2012-04-20 14:45:54 +01:00
_ etext = . ; /* End of text and rodata section */
. = ALIGN( P A G E _ S I Z E ) ;
_ _ init_ b e g i n = . ;
INIT_ T E X T _ S E C T I O N ( 8 )
.exit .text : {
ARM_ E X I T _ K E E P ( E X I T _ T E X T )
}
. = ALIGN( 1 6 ) ;
.init .data : {
INIT_ D A T A
INIT_ S E T U P ( 1 6 )
INIT_ C A L L S
CON_ I N I T C A L L
SECURITY_ I N I T C A L L
INIT_ R A M _ F S
}
.exit .data : {
ARM_ E X I T _ K E E P ( E X I T _ D A T A )
}
PERCPU_ S E C T I O N ( 6 4 )
_ _ init_ e n d = . ;
2013-11-04 16:38:47 +00:00
. = ALIGN( P A G E _ S I Z E ) ;
_ data = . ;
_ sdata = . ;
RW_ D A T A _ S E C T I O N ( 6 4 , P A G E _ S I Z E , T H R E A D _ S I Z E )
_ edata = . ;
2012-04-20 14:45:54 +01:00
BSS_ S E C T I O N ( 0 , 0 , 0 )
_ end = . ;
STABS_ D E B U G
}
2012-12-07 18:40:43 +00:00
/ *
* The H Y P i n i t c o d e c a n ' t b e m o r e t h a n a p a g e l o n g .
* /
ASSERT( ( ( _ _ h y p _ i d m a p _ t e x t _ s t a r t + P A G E _ S I Z E ) > _ _ h y p _ i d m a p _ t e x t _ e n d ) ,
" HYP i n i t c o d e t o o b i g " )