On 17 Apr 2002 23:39:16 -0700,
"Mark Huang" <email@example.com> wrote:
>From the objdump output, it looks like the exception table is in order
>at link time, but the DBE table is definitely out of order. What seems
>to be throwing it off is the dummy call to get_dbe() in traps.c. After
>sprinkling a few more calls to get_dbe() around the kernel and seeing
>what happens during link, it looks like any call to get_dbe() inside an
>__init section (or probably any explicitly located section) will throw
>off the ordering of the table.
That is what I expected. Various tables are built up from special
sections in each object. The linker is correctly appending those
sections to the final table in vmlinux. The use of multiple text
sections (init, exit, the rest) means that entries in a table for each
object are not necessarily in order, breaking the assumption that the
overall table is in order.
This is a more general problem than mips dbe, other kernel tables and
other architectures will have the same problem. I will do a general
patch against 2.5.8 to sort these tables at init time, and backport the
general fix to 2.4.19 later. In the meantime your patch will bypass
the problem for mips dbe.