[Top] [All Lists]

Re: insmod hates RELA?

To: Keith Owens <>
Subject: Re: insmod hates RELA?
From: "Maciej W. Rozycki" <>
Date: Fri, 6 Oct 2000 17:14:16 +0200 (MET DST)
Cc: Gordon McNutt <>,,
In-reply-to: <23467.970840312@ocs3.ocs-net>
Organization: Technical University of Gdansk
On Sat, 7 Oct 2000, Keith Owens wrote:

> >I've looked a little more since writing the above. The relocation errors are
> >occurring in the .bss section, where it appears insmod is iterating over all
> >references to a symbol and doing a relocation. The type of relocation done
> >for all symbols is associated with the 'R_MIPS_26' #define (see linux/elf.h).
> >Is this a bug in insmod?
> Don't think so, rather it is appears to be gcc assuming that some
> symbols can be accessed via $GP+26 bits.  I don't have a MIPS ELF
> manual handy at the moment so I am guessing that you need -mlong-calls
> for modules.

 The kernel is compiled with -fno-PIC, so it's quite likely that there are
R_MIPS_26 relocations.  They are used for all of the 'j* label'
instructions (with the target address encoded in the 26 LSBs of the
opcode).  There is no $reg+26 bits addressing mode for MIPS (but there is
$reg+16 and thus there is the R_MIPS_GPREL16 relocation).

+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+        e-mail:, PGP key available        +

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