[Top] [All Lists]

Modutils 2.1.42 for MIPS

Subject: Modutils 2.1.42 for MIPS
From: Ralf Baechle <>
Date: Fri, 25 Jul 1997 20:31:57 +0200 (MET DST)
Hi all,

I've copied my home CVS repository of modutils to Linus.  There are still two
one line fixes to the kernel required to make modules work.  I'll check them
in asap.  Many modules are working reliable while other don't work at all.
I suppose there is still some bug in the relocation code.  Try 'en and check
if they work for you.  When modutils are finally debugged I'll release normal
tar.gz source packages and binaries on the usual FTP sites.

Another note about modules affects the performance.  Modules are allocated in
kernel virtual memory which starts from 0xc0000000 upward.  This exceeds the
range of the R_MIPS_16 relocation for j and jal instructions.  Therefore
modules have to be compiled using the option -mlong-jumps which replaces j
and jal instructions by la jr/jalr sequences.  These take twelve instead
for four bytes and are a bit slower.  There are more efficient way to solve
this problem but these are also more complex.

Simple rules to optimize module code when using -mlong-jump:

  - Try to call as view external functions as possible.  Only calls
    to external functins are affected by -mlong-jumps.
  - Taking the address of a function and calling it via a function
    pointer is advantageous for repeated calls.

This is a problematic specific to MIPS.  The other considerations that
apply to modules on Intel machines apply unchanged to MIPS.

Probably not worth to write that much about ...


<Prev in Thread] Current Thread [Next in Thread>
  • Modutils 2.1.42 for MIPS, Ralf Baechle <=