2005-04-16 15:20:36 -07: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 03:20:27 +02:00
.note : { * ( .note . * ) }
[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 08:58:53 -07:00
_ _ start_ _ _ e x _ t a b l e = . ;
_ _ ex_ t a b l e : { * ( _ _ e x _ t a b l e ) }
_ _ stop_ _ _ e x _ t a b l e = . ;
2007-06-23 17:16:37 -07:00
BUG_ T A B L E
2005-04-16 15:20:36 -07:00
_ _ uml_ s e t u p _ s t a r t = . ;
.uml .setup .init : { * ( .uml .setup .init ) }
_ _ uml_ s e t u p _ e n d = . ;
_ _ uml_ h e l p _ s t a r t = . ;
.uml .help .init : { * ( .uml .help .init ) }
_ _ uml_ h e l p _ e n d = . ;
_ _ uml_ p o s t s e t u p _ s t a r t = . ;
.uml .postsetup .init : { * ( .uml .postsetup .init ) }
_ _ uml_ p o s t s e t u p _ e n d = . ;
_ _ setup_ s t a r t = . ;
.init .setup : { * ( .init .setup ) }
_ _ setup_ e n d = . ;
. = ALIGN( 3 2 ) ;
_ _ per_ c p u _ s t a r t = . ;
.data .percpu : { * ( .data .percpu ) }
_ _ per_ c p u _ e n d = . ;
_ _ initcall_ s t a r t = . ;
.initcall .init : {
2006-10-30 22:07:14 -08:00
INITCALLS
2005-04-16 15:20:36 -07:00
}
_ _ initcall_ e n d = . ;
_ _ con_ i n i t c a l l _ s t a r t = . ;
.con_initcall .init : { * ( .con_initcall .init ) }
_ _ con_ i n i t c a l l _ e n d = . ;
_ _ uml_ i n i t c a l l _ s t a r t = . ;
.uml .initcall .init : { * ( .uml .initcall .init ) }
_ _ uml_ i n i t c a l l _ e n d = . ;
_ _ init_ e n d = . ;
SECURITY_ I N I T
_ _ exitcall_ b e g i n = . ;
.exitcall : { * ( .exitcall .exit ) }
_ _ exitcall_ e n d = . ;
_ _ uml_ e x i t c a l l _ b e g i n = . ;
.uml .exitcall : { * ( .uml .exitcall .exit ) }
_ _ uml_ e x i t c a l l _ e n d = . ;
. = ALIGN( 4 ) ;
_ _ alt_ i n s t r u c t i o n s = . ;
.altinstructions : { * ( .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 : { * ( .exit .text ) }
.exit .data : { * ( .exit .data ) }
_ _ preinit_ a r r a y _ s t a r t = . ;
.preinit_array : { * ( .preinit_array ) }
_ _ preinit_ a r r a y _ e n d = . ;
_ _ init_ a r r a y _ s t a r t = . ;
.init_array : { * ( .init_array ) }
_ _ init_ a r r a y _ e n d = . ;
_ _ fini_ a r r a y _ s t a r t = . ;
.fini_array : { * ( .fini_array ) }
_ _ fini_ a r r a y _ e n d = . ;
. = ALIGN( 4 0 9 6 ) ;
_ _ initramfs_ s t a r t = . ;
.init .ramfs : { * ( .init .ramfs ) }
_ _ initramfs_ e n d = . ;
/* Sections to be discarded */
/ DISCARD/ : {
* ( .exitcall .exit )
}