2005-04-17 02:20:36 +04:00
# include < a s m - g e n e r i c / v m l i n u x . l d s . h >
.fini : { * ( .fini ) } = 0 x9 0 9 0
_ etext = . ;
PROVIDE ( e t e x t = . ) ;
. = ALIGN( 4 0 9 6 ) ;
_ sdata = . ;
PROVIDE ( s d a t a = . ) ;
RODATA
.unprotected : { * ( .unprotected ) }
. = ALIGN( 4 0 9 6 ) ;
PROVIDE ( _ u n p r o t e c t e d _ e n d = . ) ;
. = ALIGN( 4 0 9 6 ) ;
2007-03-31 05:20:27 +04:00
.note : { * ( .note . * ) }
2007-08-31 10:56:17 +04:00
_ _ 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 = . ;
}
[PATCH] uml: fix oops related to exception table
Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Prevent the kernel from oopsing during the extable sorting, as it can do
now, because the extable is in the readonly section of the binary.
Jeff says: The exception table turned RO in 2.6.11-rc3-mm1 for some reason.
Moving it causes it to land in the writable data section of the binary.
Paolo says: This patch fixes a oops on startup, which can be easily
triggered by compiling with CONFIG_MODE_TT disabled, and STATIC_LINK either
disabled or enabled. The resulting kernel will always Oops on startup,
after printing this simple output:
I've verified, by binary search on the BitKeeper repository (synced up as
of 2.6.12-rc2), starting from the range 2.6.11-2.6.12-rc1, that this bug
shows up on BitKeeper revisions in the range [@1.1994.11.168,+inf), i.e.
starting from this:
[PATCH] lib/sort: Replace insertion sort in exception tables
Since UML does not use the exception table, it's likely that insertion sort
didn't happen to write anything on the table.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-01 19:58:53 +04:00
2007-06-24 04:16:37 +04:00
BUG_ T A B L E
2007-08-31 10:56:17 +04:00
.uml .setup .init : {
_ _ uml_ s e t u p _ s t a r t = . ;
* ( .uml .setup .init )
_ _ uml_ s e t u p _ e n d = . ;
}
2005-04-17 02:20:36 +04:00
2007-08-31 10:56:17 +04:00
.uml .help .init : {
_ _ uml_ h e l p _ s t a r t = . ;
* ( .uml .help .init )
_ _ uml_ h e l p _ e n d = . ;
}
2005-04-17 02:20:36 +04:00
2007-08-31 10:56:17 +04:00
.uml .postsetup .init : {
_ _ uml_ p o s t s e t u p _ s t a r t = . ;
* ( .uml .postsetup .init )
_ _ uml_ p o s t s e t u p _ e n d = . ;
}
2005-04-17 02:20:36 +04:00
2007-08-31 10:56:17 +04:00
.init .setup : {
_ _ setup_ s t a r t = . ;
* ( .init .setup )
_ _ setup_ e n d = . ;
}
2005-04-17 02:20:36 +04:00
. = ALIGN( 3 2 ) ;
2007-08-31 10:56:17 +04:00
.data .percpu : {
_ _ per_ c p u _ s t a r t = . ;
* ( .data .percpu )
_ _ per_ c p u _ e n d = . ;
}
2005-04-17 02:20:36 +04:00
.initcall .init : {
2007-08-31 10:56:17 +04:00
_ _ initcall_ s t a r t = . ;
2006-10-31 09:07:14 +03:00
INITCALLS
2007-08-31 10:56:17 +04:00
_ _ initcall_ e n d = . ;
2005-04-17 02:20:36 +04:00
}
2007-08-31 10:56:17 +04:00
.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 = . ;
}
2005-04-17 02:20:36 +04:00
2007-08-31 10:56:17 +04:00
.uml .initcall .init : {
_ _ uml_ i n i t c a l l _ s t a r t = . ;
* ( .uml .initcall .init )
_ _ uml_ i n i t c a l l _ e n d = . ;
}
2005-04-17 02:20:36 +04:00
_ _ init_ e n d = . ;
SECURITY_ I N I T
2007-08-31 10:56:17 +04:00
.exitcall : {
_ _ exitcall_ b e g i n = . ;
* ( .exitcall .exit )
_ _ exitcall_ e n d = . ;
}
2005-04-17 02:20:36 +04:00
2007-08-31 10:56:17 +04:00
.uml .exitcall : {
_ _ uml_ e x i t c a l l _ b e g i n = . ;
* ( .uml .exitcall .exit )
_ _ uml_ e x i t c a l l _ e n d = . ;
}
2005-04-17 02:20:36 +04:00
. = ALIGN( 4 ) ;
2007-08-31 10:56:17 +04:00
.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 = . ;
}
2005-04-17 02:20:36 +04:00
.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 : { * ( .exit .text ) }
.exit .data : { * ( .exit .data ) }
2007-08-31 10:56:17 +04:00
.preinit_array : {
_ _ preinit_ a r r a y _ s t a r t = . ;
* ( .preinit_array )
_ _ preinit_ a r r a y _ e n d = . ;
}
.init_array : {
_ _ init_ a r r a y _ s t a r t = . ;
* ( .init_array )
_ _ init_ a r r a y _ e n d = . ;
}
.fini_array : {
_ _ fini_ a r r a y _ s t a r t = . ;
* ( .fini_array )
_ _ fini_ a r r a y _ e n d = . ;
}
2005-04-17 02:20:36 +04:00
. = ALIGN( 4 0 9 6 ) ;
2007-08-31 10:56:17 +04:00
.init .ramfs : {
_ _ initramfs_ s t a r t = . ;
* ( .init .ramfs )
_ _ initramfs_ e n d = . ;
}
2005-04-17 02:20:36 +04:00
/* Sections to be discarded */
/ DISCARD/ : {
* ( .exitcall .exit )
}