2005-06-24 09:01:16 +04:00
/ *
* arch/ x t e n s a / k e r n e l / v m l i n u x . l d s . S
*
* Xtensa l i n k e r s c r i p t
*
* This f i l e i s s u b j e c t t o t h e t e r m s a n d c o n d i t i o n s o f t h e G N U G e n e r a l P u b l i c
* License. S e e t h e f i l e " C O P Y I N G " i n t h e m a i n d i r e c t o r y o f t h i s a r c h i v e
* for m o r e d e t a i l s .
*
2013-01-05 04:57:17 +04:00
* Copyright ( C ) 2 0 0 1 - 2 0 0 8 T e n s i l i c a I n c .
2005-06-24 09:01:16 +04:00
*
* Chris Z a n k e l < c h r i s @zankel.net>
* Marc G a u t h i e r < m a r c @tensilica.com, marc@alumni.uwaterloo.ca>
* Joe T a y l o r < j o e @tensilica.com, joetylr@yahoo.com>
* /
2019-10-30 00:13:47 +03:00
# define R O _ E X C E P T I O N _ T A B L E _ A L I G N 1 6
2005-06-24 09:01:16 +04:00
# include < a s m - g e n e r i c / v m l i n u x . l d s . h >
2009-09-24 18:36:19 +04:00
# include < a s m / p a g e . h >
# include < a s m / t h r e a d _ i n f o . h >
2005-06-24 09:01:16 +04:00
2019-01-02 06:41:55 +03:00
# include < a s m / c o r e . h >
2012-12-03 15:01:43 +04:00
# include < a s m / v e c t o r s . h >
2018-08-14 04:14:14 +03:00
2005-06-24 09:01:16 +04:00
OUTPUT_ A R C H ( x t e n s a )
ENTRY( _ s t a r t )
2006-12-10 13:18:48 +03:00
# ifdef _ _ X T E N S A _ E B _ _
2005-06-24 09:01:16 +04:00
jiffies = j i f f i e s _ 6 4 + 4 ;
# else
jiffies = j i f f i e s _ 6 4 ;
# endif
/ * Note : In t h e f o l l o w i n g m a c r o s , i t w o u l d b e n i c e t o s p e c i f y o n l y t h e
vector n a m e a n d s e c t i o n k i n d a n d c o n s t r u c t " s y m " a n d " s e c t i o n " u s i n g
CPP c o n c a t e n a t i o n , b u t t h a t d o e s n o t w o r k r e l i a b l y . C o n c a t e n a t i n g a
string w i t h " . " p r o d u c e s a n i n v a l i d t o k e n . C P P w i l l n o t p r i n t a
warning b e c a u s e i t t h i n k s t h i s i s a n a s s e m b l y f i l e , b u t i t l e a v e s
them a s m u l t i p l e t o k e n s a n d t h e r e m a y o r m a y n o t b e w h i t e s p a c e
between t h e m . * /
/* Macro for a relocation entry */
# define R E L O C A T E _ E N T R Y ( s y m , s e c t i o n ) \
LONG( s y m ## _ s t a r t ) ; \
LONG( s y m ## _ e n d ) ; \
LONG( L O A D A D D R ( s e c t i o n ) )
2020-02-01 07:11:24 +03:00
# if ! d e f i n e d ( C O N F I G _ V E C T O R S _ A D D R ) & & X C H A L _ H A V E _ V E C B A S E
# define M E R G E D _ V E C T O R S 1
# else
# define M E R G E D _ V E C T O R S 0
# endif
2017-12-04 07:55:35 +03:00
/ *
2020-02-01 07:11:24 +03:00
* Macro t o d e f i n e a s e c t i o n f o r a v e c t o r . W h e n M E R G E D _ V E C T O R S i s 0
* code f o r e v e r y v e c t o r i s l o c a t e d w i t h o t h e r i n i t d a t a . A t s t a r t u p
2017-12-04 07:55:35 +03:00
* time h e a d . S c o p i e s c o d e f o r e v e r y v e c t o r t o i t s f i n a l p o s i t i o n a c c o r d i n g
* to d e s c r i p t i o n r e c o r d e d i n t h e c o r r e s p o n d i n g R E L O C A T E _ E N T R Y .
2005-06-24 09:01:16 +04:00
* /
2020-02-01 08:25:03 +03:00
# define S E C T I O N _ V E C T O R 4 ( s y m , s e c t i o n , a d d r , p r e v s e c ) \
2017-12-04 07:55:35 +03:00
section a d d r : A T ( ( ( L O A D A D D R ( p r e v s e c ) + S I Z E O F ( p r e v s e c ) ) + 3 ) & ~ 3 ) \
2005-06-24 09:01:16 +04:00
{ \
. = ALIGN( 4 ) ; \
sym ## _ s t a r t = A B S O L U T E ( . ) ; \
* ( section) \
sym ## _ e n d = A B S O L U T E ( . ) ; \
}
2020-02-01 08:25:03 +03:00
# define S E C T I O N _ V E C T O R 2 ( s e c t i o n , a d d r ) \
2017-01-04 21:40:49 +03:00
. = addr; \
* ( section)
2005-06-24 09:01:16 +04:00
/ *
* Mapping o f i n p u t s e c t i o n s t o o u t p u t s e c t i o n s w h e n l i n k i n g .
* /
SECTIONS
{
2006-12-10 13:18:48 +03:00
. = KERNELOFFSET;
2005-06-24 09:01:16 +04:00
/* .text section */
_ text = . ;
_ stext = . ;
.text :
{
2009-04-26 06:10:57 +04:00
/* The HEAD_TEXT section must be the first section! */
HEAD_ T E X T
2017-01-04 21:40:49 +03:00
2020-02-01 07:11:24 +03:00
# if M E R G E D _ V E C T O R S
2020-02-01 08:25:03 +03:00
. = ALIGN( P A G E _ S I Z E ) ;
_ vecbase = . ;
2017-01-04 21:40:49 +03:00
2021-07-26 17:32:55 +03:00
# ifdef S U P P O R T _ W I N D O W E D
2020-02-01 08:25:03 +03:00
SECTION_ V E C T O R 2 ( . W i n d o w V e c t o r s . t e x t , W I N D O W _ V E C T O R S _ V A D D R )
2021-07-26 17:32:55 +03:00
# endif
2017-01-04 21:40:49 +03:00
# if X C H A L _ E X C M _ L E V E L > = 2
2020-02-01 08:25:03 +03:00
SECTION_ V E C T O R 2 ( . L e v e l 2 I n t e r r u p t V e c t o r . t e x t , I N T L E V E L 2 _ V E C T O R _ V A D D R )
2017-01-04 21:40:49 +03:00
# endif
# if X C H A L _ E X C M _ L E V E L > = 3
2020-02-01 08:25:03 +03:00
SECTION_ V E C T O R 2 ( . L e v e l 3 I n t e r r u p t V e c t o r . t e x t , I N T L E V E L 3 _ V E C T O R _ V A D D R )
2017-01-04 21:40:49 +03:00
# endif
# if X C H A L _ E X C M _ L E V E L > = 4
2020-02-01 08:25:03 +03:00
SECTION_ V E C T O R 2 ( . L e v e l 4 I n t e r r u p t V e c t o r . t e x t , I N T L E V E L 4 _ V E C T O R _ V A D D R )
2017-01-04 21:40:49 +03:00
# endif
# if X C H A L _ E X C M _ L E V E L > = 5
2020-02-01 08:25:03 +03:00
SECTION_ V E C T O R 2 ( . L e v e l 5 I n t e r r u p t V e c t o r . t e x t , I N T L E V E L 5 _ V E C T O R _ V A D D R )
2017-01-04 21:40:49 +03:00
# endif
# if X C H A L _ E X C M _ L E V E L > = 6
2020-02-01 08:25:03 +03:00
SECTION_ V E C T O R 2 ( . L e v e l 6 I n t e r r u p t V e c t o r . t e x t , I N T L E V E L 6 _ V E C T O R _ V A D D R )
2017-01-04 21:40:49 +03:00
# endif
2020-02-01 08:25:03 +03:00
SECTION_ V E C T O R 2 ( . D e b u g I n t e r r u p t V e c t o r . t e x t , D E B U G _ V E C T O R _ V A D D R )
SECTION_ V E C T O R 2 ( . K e r n e l E x c e p t i o n V e c t o r . t e x t , K E R N E L _ V E C T O R _ V A D D R )
SECTION_ V E C T O R 2 ( . U s e r E x c e p t i o n V e c t o r . t e x t , U S E R _ V E C T O R _ V A D D R )
SECTION_ V E C T O R 2 ( . D o u b l e E x c e p t i o n V e c t o r . t e x t , D O U B L E E X C _ V E C T O R _ V A D D R )
2020-02-01 05:48:43 +03:00
2020-02-01 08:25:03 +03:00
* ( .exception .text )
2017-01-04 21:40:49 +03:00
# endif
2017-12-04 07:55:35 +03:00
IRQENTRY_ T E X T
SOFTIRQENTRY_ T E X T
ENTRY_ T E X T
2009-04-21 11:34:15 +04:00
TEXT_ T E X T
2017-12-04 07:55:35 +03:00
SCHED_ T E X T
CPUIDLE_ T E X T
LOCK_ T E X T
2019-10-14 21:33:44 +03:00
* ( .fixup )
2005-06-24 09:01:16 +04:00
}
_ etext = . ;
2007-06-01 04:47:01 +04:00
PROVIDE ( e t e x t = . ) ;
2005-06-24 09:01:16 +04:00
. = ALIGN( 1 6 ) ;
2019-10-30 00:13:33 +03:00
RO_ D A T A ( 4 0 9 6 )
2005-06-24 09:01:16 +04:00
/* Data section */
2017-01-04 04:57:51 +03:00
# ifdef C O N F I G _ X I P _ K E R N E L
INIT_ T E X T _ S E C T I O N ( P A G E _ S I Z E )
# else
2012-06-20 23:52:58 +04:00
_ sdata = . ;
2019-10-30 00:13:35 +03:00
RW_ D A T A ( X C H A L _ I C A C H E _ L I N E S I Z E , P A G E _ S I Z E , T H R E A D _ S I Z E )
2005-06-24 09:01:16 +04:00
_ edata = . ;
/* Initialization code and data: */
2009-09-24 18:36:19 +04:00
. = ALIGN( P A G E _ S I Z E ) ;
2005-06-24 09:01:16 +04:00
_ _ init_ b e g i n = . ;
2009-09-24 18:36:19 +04:00
INIT_ T E X T _ S E C T I O N ( P A G E _ S I Z E )
2005-06-24 09:01:16 +04:00
.init .data :
{
2008-01-20 16:15:03 +03:00
INIT_ D A T A
2017-01-04 04:57:51 +03:00
}
# endif
.init .rodata :
{
2005-06-24 09:01:16 +04:00
. = ALIGN( 0 x4 ) ;
_ _ tagtable_ b e g i n = . ;
* ( .taglist )
_ _ tagtable_ e n d = . ;
2007-06-01 04:47:01 +04:00
. = ALIGN( 1 6 ) ;
_ _ boot_ r e l o c _ t a b l e _ s t a r t = A B S O L U T E ( . ) ;
2020-02-01 07:11:24 +03:00
# if ! M E R G E D _ V E C T O R S
2021-07-26 17:32:55 +03:00
# ifdef S U P P O R T _ W I N D O W E D
2007-06-01 04:47:01 +04:00
RELOCATE_ E N T R Y ( _ W i n d o w V e c t o r s _ t e x t ,
.WindowVectors .text ) ;
2021-07-26 17:32:55 +03:00
# endif
2013-01-05 04:57:17 +04:00
# if X C H A L _ E X C M _ L E V E L > = 2
RELOCATE_ E N T R Y ( _ L e v e l 2 I n t e r r u p t V e c t o r _ t e x t ,
.Level2InterruptVector .text ) ;
# endif
# if X C H A L _ E X C M _ L E V E L > = 3
RELOCATE_ E N T R Y ( _ L e v e l 3 I n t e r r u p t V e c t o r _ t e x t ,
.Level3InterruptVector .text ) ;
# endif
# if X C H A L _ E X C M _ L E V E L > = 4
RELOCATE_ E N T R Y ( _ L e v e l 4 I n t e r r u p t V e c t o r _ t e x t ,
.Level4InterruptVector .text ) ;
# endif
# if X C H A L _ E X C M _ L E V E L > = 5
RELOCATE_ E N T R Y ( _ L e v e l 5 I n t e r r u p t V e c t o r _ t e x t ,
.Level5InterruptVector .text ) ;
# endif
# if X C H A L _ E X C M _ L E V E L > = 6
RELOCATE_ E N T R Y ( _ L e v e l 6 I n t e r r u p t V e c t o r _ t e x t ,
.Level6InterruptVector .text ) ;
# endif
2007-06-01 04:47:01 +04:00
RELOCATE_ E N T R Y ( _ K e r n e l E x c e p t i o n V e c t o r _ t e x t ,
.KernelExceptionVector .text ) ;
RELOCATE_ E N T R Y ( _ U s e r E x c e p t i o n V e c t o r _ t e x t ,
.UserExceptionVector .text ) ;
RELOCATE_ E N T R Y ( _ D o u b l e E x c e p t i o n V e c t o r _ t e x t ,
.DoubleExceptionVector .text ) ;
2007-12-31 09:00:54 +03:00
RELOCATE_ E N T R Y ( _ D e b u g I n t e r r u p t V e c t o r _ t e x t ,
.DebugInterruptVector .text ) ;
2020-02-01 05:48:43 +03:00
RELOCATE_ E N T R Y ( _ e x c e p t i o n _ t e x t ,
.exception .text ) ;
2017-01-04 21:40:49 +03:00
# endif
2017-01-04 04:57:51 +03:00
# ifdef C O N F I G _ X I P _ K E R N E L
RELOCATE_ E N T R Y ( _ x i p _ d a t a , . d a t a ) ;
RELOCATE_ E N T R Y ( _ x i p _ i n i t _ d a t a , . i n i t . d a t a ) ;
2020-02-01 08:25:03 +03:00
# endif
2021-12-28 12:28:53 +03:00
# if d e f i n e d ( C O N F I G _ S E C O N D A R Y _ R E S E T _ V E C T O R )
2013-10-17 02:42:26 +04:00
RELOCATE_ E N T R Y ( _ S e c o n d a r y R e s e t V e c t o r _ t e x t ,
.SecondaryResetVector .text ) ;
# endif
2007-06-01 04:47:01 +04:00
_ _ boot_ r e l o c _ t a b l e _ e n d = A B S O L U T E ( . ) ;
2005-06-24 09:01:16 +04:00
2009-09-24 18:36:19 +04:00
INIT_ S E T U P ( X C H A L _ I C A C H E _ L I N E S I Z E )
INIT_ C A L L S
CON_ I N I T C A L L
INIT_ R A M _ F S
2005-06-24 09:01:16 +04:00
}
2007-06-01 04:47:01 +04:00
2011-03-24 20:50:09 +03:00
PERCPU_ S E C T I O N ( X C H A L _ I C A C H E _ L I N E S I Z E )
2007-06-01 04:47:01 +04:00
2005-06-24 09:01:16 +04:00
/* We need this dummy segment here */
. = ALIGN( 4 ) ;
.dummy : { LONG( 0 ) }
2020-02-01 08:25:03 +03:00
# undef L A S T
# define L A S T . d u m m y
2020-02-01 07:11:24 +03:00
# if ! M E R G E D _ V E C T O R S
2005-06-24 09:01:16 +04:00
/* The vectors are relocated to the real position at startup time */
2021-07-26 17:32:55 +03:00
# ifdef S U P P O R T _ W I N D O W E D
2020-02-01 08:25:03 +03:00
SECTION_ V E C T O R 4 ( _ W i n d o w V e c t o r s _ t e x t ,
2005-06-24 09:01:16 +04:00
.WindowVectors .text ,
2017-12-04 07:55:35 +03:00
WINDOW_ V E C T O R S _ V A D D R ,
2021-07-26 17:32:55 +03:00
LAST)
# undef L A S T
# define L A S T . W i n d o w V e c t o r s . t e x t
# endif
2020-02-01 08:25:03 +03:00
SECTION_ V E C T O R 4 ( _ D e b u g I n t e r r u p t V e c t o r _ t e x t ,
2005-06-24 09:01:16 +04:00
.DebugInterruptVector .text ,
2012-12-03 15:01:43 +04:00
DEBUG_ V E C T O R _ V A D D R ,
2021-07-26 17:32:55 +03:00
LAST)
2013-01-05 04:57:17 +04:00
# undef L A S T
# define L A S T . D e b u g I n t e r r u p t V e c t o r . t e x t
# if X C H A L _ E X C M _ L E V E L > = 2
2020-02-01 08:25:03 +03:00
SECTION_ V E C T O R 4 ( _ L e v e l 2 I n t e r r u p t V e c t o r _ t e x t ,
2013-01-05 04:57:17 +04:00
.Level2InterruptVector .text ,
2012-12-03 15:01:43 +04:00
INTLEVEL2 _ V E C T O R _ V A D D R ,
2017-12-04 07:55:35 +03:00
LAST)
2013-01-05 04:57:17 +04:00
# undef L A S T
# define L A S T . L e v e l 2 I n t e r r u p t V e c t o r . t e x t
# endif
# if X C H A L _ E X C M _ L E V E L > = 3
2020-02-01 08:25:03 +03:00
SECTION_ V E C T O R 4 ( _ L e v e l 3 I n t e r r u p t V e c t o r _ t e x t ,
2013-01-05 04:57:17 +04:00
.Level3InterruptVector .text ,
2012-12-03 15:01:43 +04:00
INTLEVEL3 _ V E C T O R _ V A D D R ,
2017-12-04 07:55:35 +03:00
LAST)
2013-01-05 04:57:17 +04:00
# undef L A S T
# define L A S T . L e v e l 3 I n t e r r u p t V e c t o r . t e x t
# endif
# if X C H A L _ E X C M _ L E V E L > = 4
2020-02-01 08:25:03 +03:00
SECTION_ V E C T O R 4 ( _ L e v e l 4 I n t e r r u p t V e c t o r _ t e x t ,
2013-01-05 04:57:17 +04:00
.Level4InterruptVector .text ,
2012-12-03 15:01:43 +04:00
INTLEVEL4 _ V E C T O R _ V A D D R ,
2017-12-04 07:55:35 +03:00
LAST)
2013-01-05 04:57:17 +04:00
# undef L A S T
# define L A S T . L e v e l 4 I n t e r r u p t V e c t o r . t e x t
# endif
# if X C H A L _ E X C M _ L E V E L > = 5
2020-02-01 08:25:03 +03:00
SECTION_ V E C T O R 4 ( _ L e v e l 5 I n t e r r u p t V e c t o r _ t e x t ,
2013-01-05 04:57:17 +04:00
.Level5InterruptVector .text ,
2012-12-03 15:01:43 +04:00
INTLEVEL5 _ V E C T O R _ V A D D R ,
2017-12-04 07:55:35 +03:00
LAST)
2013-01-05 04:57:17 +04:00
# undef L A S T
# define L A S T . L e v e l 5 I n t e r r u p t V e c t o r . t e x t
# endif
# if X C H A L _ E X C M _ L E V E L > = 6
2020-02-01 08:25:03 +03:00
SECTION_ V E C T O R 4 ( _ L e v e l 6 I n t e r r u p t V e c t o r _ t e x t ,
2013-01-05 04:57:17 +04:00
.Level6InterruptVector .text ,
2012-12-03 15:01:43 +04:00
INTLEVEL6 _ V E C T O R _ V A D D R ,
2017-12-04 07:55:35 +03:00
LAST)
2013-01-05 04:57:17 +04:00
# undef L A S T
# define L A S T . L e v e l 6 I n t e r r u p t V e c t o r . t e x t
# endif
2020-02-01 08:25:03 +03:00
SECTION_ V E C T O R 4 ( _ K e r n e l E x c e p t i o n V e c t o r _ t e x t ,
2005-06-24 09:01:16 +04:00
.KernelExceptionVector .text ,
2012-12-03 15:01:43 +04:00
KERNEL_ V E C T O R _ V A D D R ,
2017-12-04 07:55:35 +03:00
LAST)
# undef L A S T
2020-02-01 08:25:03 +03:00
SECTION_ V E C T O R 4 ( _ U s e r E x c e p t i o n V e c t o r _ t e x t ,
2005-06-24 09:01:16 +04:00
.UserExceptionVector .text ,
2012-12-03 15:01:43 +04:00
USER_ V E C T O R _ V A D D R ,
2017-12-04 07:55:35 +03:00
.KernelExceptionVector .text )
2020-02-01 08:25:03 +03:00
SECTION_ V E C T O R 4 ( _ D o u b l e E x c e p t i o n V e c t o r _ t e x t ,
2005-06-24 09:01:16 +04:00
.DoubleExceptionVector .text ,
2012-12-03 15:01:43 +04:00
DOUBLEEXC_ V E C T O R _ V A D D R ,
2017-12-04 07:55:35 +03:00
.UserExceptionVector .text )
2020-02-01 05:48:43 +03:00
# define L A S T . D o u b l e E x c e p t i o n V e c t o r . t e x t
2013-10-17 02:42:26 +04:00
2017-01-04 21:40:49 +03:00
# endif
2021-12-28 12:28:53 +03:00
# if d e f i n e d ( C O N F I G _ S E C O N D A R Y _ R E S E T _ V E C T O R )
2013-10-17 02:42:26 +04:00
2020-02-01 08:25:03 +03:00
SECTION_ V E C T O R 4 ( _ S e c o n d a r y R e s e t V e c t o r _ t e x t ,
2013-10-17 02:42:26 +04:00
.SecondaryResetVector .text ,
RESET_ V E C T O R 1 _ V A D D R ,
2020-02-01 08:25:03 +03:00
LAST)
2020-02-01 05:48:43 +03:00
# undef L A S T
# define L A S T . S e c o n d a r y R e s e t V e c t o r . t e x t
2013-10-17 02:42:26 +04:00
2020-02-01 05:48:43 +03:00
# endif
2020-02-01 07:11:24 +03:00
# if ! M E R G E D _ V E C T O R S
2020-02-01 08:25:03 +03:00
SECTION_ V E C T O R 4 ( _ e x c e p t i o n _ t e x t ,
2020-02-01 05:48:43 +03:00
.exception .text ,
,
LAST)
# undef L A S T
# define L A S T . e x c e p t i o n . t e x t
2013-10-17 02:42:26 +04:00
# endif
2020-02-01 05:48:43 +03:00
. = ( LOADADDR( L A S T ) + S I Z E O F ( L A S T ) + 3 ) & ~ 3 ;
2013-10-17 02:42:26 +04:00
2020-02-01 07:11:24 +03:00
.dummy1 : AT( A D D R ( . d u m m y 1 ) ) { L O N G ( 0 ) }
2009-09-24 18:36:19 +04:00
. = ALIGN( P A G E _ S I Z E ) ;
2005-06-24 09:01:16 +04:00
2017-01-04 04:57:51 +03:00
# ifndef C O N F I G _ X I P _ K E R N E L
2005-06-24 09:01:16 +04:00
_ _ init_ e n d = . ;
2009-09-24 18:36:19 +04:00
BSS_ S E C T I O N ( 0 , 8 1 9 2 , 0 )
2017-01-04 04:57:51 +03:00
# endif
2007-06-01 04:47:01 +04:00
2005-06-24 09:01:16 +04:00
_ end = . ;
2017-01-04 04:57:51 +03:00
# ifdef C O N F I G _ X I P _ K E R N E L
. = CONFIG_ X I P _ D A T A _ A D D R ;
_ xip_ s t a r t = . ;
# undef L O A D _ O F F S E T
# define L O A D _ O F F S E T \
2020-02-01 07:11:24 +03:00
( CONFIG_ X I P _ D A T A _ A D D R - ( L O A D A D D R ( . d u m m y 1 ) + S I Z E O F ( . d u m m y 1 ) + 3 ) & ~ 3 )
2017-01-04 04:57:51 +03:00
_ xip_ d a t a _ s t a r t = . ;
_ sdata = . ;
2019-12-03 23:46:44 +03:00
RW_ D A T A ( X C H A L _ I C A C H E _ L I N E S I Z E , P A G E _ S I Z E , T H R E A D _ S I Z E )
2017-01-04 04:57:51 +03:00
_ edata = . ;
_ xip_ d a t a _ e n d = . ;
/* Initialization data: */
STRUCT_ A L I G N ( ) ;
_ xip_ i n i t _ d a t a _ s t a r t = . ;
_ _ init_ b e g i n = . ;
.init .data :
{
INIT_ D A T A
}
_ xip_ i n i t _ d a t a _ e n d = . ;
_ _ init_ e n d = . ;
BSS_ S E C T I O N ( 0 , 8 1 9 2 , 0 )
_ xip_ e n d = . ;
# undef L O A D _ O F F S E T
# endif
2018-10-30 04:30:46 +03:00
DWARF_ D E B U G
2005-06-24 09:01:16 +04:00
2018-10-30 11:28:56 +03:00
.xt .prop 0 : { KEEP( * ( . x t . p r o p . x t . p r o p . * . g n u . l i n k o n c e . p r o p . * ) ) }
.xt .insn 0 : { KEEP( * ( . x t . i n s n . x t . i n s n . * . g n u . l i n k o n c e . x * ) ) }
.xt .lit 0 : { KEEP( * ( . x t . l i t . x t . l i t . * . g n u . l i n k o n c e . p * ) ) }
linker script: unify usage of discard definition
Discarded sections in different archs share some commonality but have
considerable differences. This led to linker script for each arch
implementing its own /DISCARD/ definition, which makes maintaining
tedious and adding new entries error-prone.
This patch makes all linker scripts to move discard definitions to the
end of the linker script and use the common DISCARDS macro. As ld
uses the first matching section definition, archs can include default
discarded sections by including them earlier in the linker script.
ia64 is notable because it first throws away some ia64 specific
subsections and then include the rest of the sections into the final
image, so those sections must be discarded before the inclusion.
defconfig compile tested for x86, x86-64, powerpc, powerpc64, ia64,
alpha, sparc, sparc64 and s390. Michal Simek tested microblaze.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Tested-by: Michal Simek <monstr@monstr.eu>
Cc: linux-arch@vger.kernel.org
Cc: Michal Simek <monstr@monstr.eu>
Cc: microblaze-uclinux@itee.uq.edu.au
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Tony Luck <tony.luck@intel.com>
2009-07-09 06:27:40 +04:00
/* Sections to be discarded */
DISCARDS
2005-06-24 09:01:16 +04:00
}