[Top] [All Lists]

Re: [patch] modutils 2.4.6: Make __dbe_table available to modules

To: "Maciej W. Rozycki" <>
Subject: Re: [patch] modutils 2.4.6: Make __dbe_table available to modules
From: Keith Owens <>
Date: Tue, 14 Aug 2001 01:14:02 +1000
Cc: Ralf Baechle <>, Harald Koerfgen <>,,
In-reply-to: Your message of "Mon, 13 Aug 2001 16:49:22 +0200." <>
On Mon, 13 Aug 2001 16:49:22 +0200 (MET DST), 
"Maciej W. Rozycki" <> wrote:
>On Tue, 14 Aug 2001, Keith Owens wrote:
>> The only other change you have to make is to init_modules().  For mips
>> you create pointers to the kernel dbe tables and fill in archdata start
>> and end in kernel_module.  Since init_module is called before kmalloc
>> is ready, make the kernel dbe table a static variable.
> __dbe_table is initialized exactly like __ex_table, i.e. it's a separate
>ELF section with pointers to the start and the end computed in a linker
>script.  Thus it is fine.  The table has actually been present in the
>kernel for quite some time already. 

You still need this:

struct archdata {
  const struct exception_table_entry *dbe_table_start;
  const struct exception_table_entry *dbe_table_end;

In init_module:

#ifdef __mips__
    extern const struct exception_table_entry __start___dbe_table[];
    extern const struct exception_table_entry __stop___dbe_table[];
    static struct archdata archdata_mips =
      { __start___dbe_table, __end___dbe_table };
    kernel_module.archdata_start = (char *)&archdata_mips;
    kernel_module.archdata_end = kernel_module.archdata_start +

I really need to add an arch specific init_module routine as well,
instead of conditional code in init_module, but that means changing all
architectures.  Not today.

<Prev in Thread] Current Thread [Next in Thread>