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: macro@ds2.pg.gda.pl, PGP key available +
|