2011-06-04 22:52:05 +04:00
/ *
* OpenRISC v m l i n u x . l d s . S
*
* Linux a r c h i t e c t u r a l p o r t b o r r o w i n g l i b e r a l l y f r o m s i m i l a r w o r k s o f
* others. A l l o r i g i n a l c o p y r i g h t s a p p l y a s p e r t h e o r i g i n a l s o u r c e
* declaration.
*
* Modifications f o r t h e O p e n R I S C a r c h i t e c t u r e :
* Copyright ( C ) 2 0 0 3 M a t j a z B r e s k v a r < p h o e n i x @bsemi.com>
* Copyright ( C ) 2 0 1 0 - 2 0 1 1 J o n a s B o n n < j o n a s @southpole.se>
*
* 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 i t 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
* as p u b l i s h e d b y t h e 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 t h e L i c e n s e , o r ( a t 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 .
*
* ld s c r i p t f o r O p e n R I S C a r c h i t e c t u r e
* /
/ * TODO
* - clean u p _ _ o f f s e t & s t u f f
2017-02-28 01:28:58 +03:00
* - change a l l 8 1 9 2 a l i g n m e n t t o P A G E ! ! !
* - recheck i f a l l a l i g n m e n t s a r e r e a l l y n e e d e d
2011-06-04 22:52:05 +04:00
* /
# define L O A D _ O F F S E T P A G E _ O F F S E T
# define L O A D _ B A S E P A G E _ O F F S E T
# include < a s m / p a g e . h >
# include < a s m / c a c h e . h >
# include < a s m - g e n e r i c / v m l i n u x . l d s . h >
2014-07-20 01:39:08 +04:00
# ifdef _ _ O R 1 K _ _
# define _ _ O U T P U T _ F O R M A T " e l f32 - o r1 k "
# else
# define _ _ O U T P U T _ F O R M A T " e l f32 - o r32 "
# endif
OUTPUT_ F O R M A T ( _ _ O U T P U T _ F O R M A T , _ _ O U T P U T _ F O R M A T , _ _ O U T P U T _ F O R M A T )
2011-06-04 22:52:05 +04:00
jiffies = j i f f i e s _ 6 4 + 4 ;
SECTIONS
{
/* Read-only sections, merged into text segment: */
. = LOAD_ B A S E ;
2016-12-14 15:27:57 +03:00
_ text = . ;
2011-06-04 22:52:05 +04:00
/* _s_kernel_ro must be page aligned */
. = ALIGN( P A G E _ S I Z E ) ;
_ s_ k e r n e l _ r o = . ;
.text : AT( A D D R ( . t e x t ) - L O A D _ O F F S E T )
{
_ stext = . ;
TEXT_ T E X T
SCHED_ T E X T
2016-10-08 03:02:55 +03:00
CPUIDLE_ T E X T
2011-06-04 22:52:05 +04:00
LOCK_ T E X T
KPROBES_ T E X T
IRQENTRY_ T E X T
2016-03-26 00:22:05 +03:00
SOFTIRQENTRY_ T E X T
2011-06-04 22:52:05 +04:00
* ( .fixup )
* ( .text .__ * )
_ etext = . ;
}
/ * TODO : Check i f f i x u p a n d t e x t . _ _ * a r e r e a l l y n e c e s s a r y
* fixup i s d e f i n i t e l y n e c e s s a r y
* /
_ sdata = . ;
/* Page alignment required for RO_DATA_SECTION */
RO_ D A T A _ S E C T I O N ( P A G E _ S I Z E )
_ e_ k e r n e l _ r o = . ;
/* Whatever comes after _e_kernel_ro had better be page-aligend, too */
/* 32 here is cacheline size... recheck this */
RW_ D A T A _ S E C T I O N ( 3 2 , P A G E _ S I Z E , P A G E _ S I Z E )
_ edata = . ;
EXCEPTION_ T A B L E ( 4 )
NOTES
/* Init code and data */
. = ALIGN( P A G E _ S I Z E ) ;
_ _ init_ b e g i n = . ;
HEAD_ T E X T _ S E C T I O N
/* Page aligned */
INIT_ T E X T _ S E C T I O N ( P A G E _ S I Z E )
/* Align __setup_start on 16 byte boundary */
INIT_ D A T A _ S E C T I O N ( 1 6 )
PERCPU_ S E C T I O N ( L 1 _ C A C H E _ B Y T E S )
_ _ init_ e n d = . ;
. = ALIGN( P A G E _ S I Z E ) ;
.initrd : AT( A D D R ( . i n i t r d ) - L O A D _ O F F S E T )
{
_ _ initrd_ s t a r t = . ;
* ( .initrd )
_ _ initrd_ e n d = . ;
FILL ( 0 ) ;
. = ALIGN ( P A G E _ S I Z E ) ;
}
_ _ vmlinux_ e n d = . ; /* last address of the physical file */
BSS_ S E C T I O N ( 0 , 0 , 0 x20 )
_ end = . ;
/* Throw in the debugging sections */
STABS_ D E B U G
DWARF_ D E B U G
/* Sections to be discarded -- must be last */
DISCARDS
}