lkml.org 
[lkml]   [2002]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: __ex_table vs. init sections bug in most architectures
Date
On Thu, 4 Jul 2002 00:09:17 -0700, 
"Adam J. Richter" <adam@yggdrasil.com> wrote:
> It looks like all architectures except {sparc,ppc}{,64} rely on
>the __ex_table section already being sorted by the address of the
>instruction that caused the memory access violation that is to be fixed
>up. However, __ex_table will not be constructed in sorted order if it
>includes any references made from an __init or __exit routine, because
>these routines are loaded into the kernel image after all of the other
>routines, rather than being loaded in the order in which they appear in
>each source file.

http://marc.theaimsgroup.com/?l=linux-kernel&m=101912337804026&w=2 and
the following thread. I was going to recode using the ppc insert sort
but got sidetracked.

>One refinement of this
>approach would be have some bfd tool sort __ex_table in vmlinux
>when the kernel is linked, and to do something similar for
>modules, to keep the sort out of the kernel and save a few
>microseconds of run time.

That either requires bfd devel to build the kernel (no chance) or a
program that can cope with cross compilation, including different word
sizes and endianness between the build and target machines. It is
easier and safer to do the sort at boot time then discard the code.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:22    [W:0.063 / U:8.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site