Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Keith Owens <kaos@ocs.com.au>
To: Gordon McNutt <gmcnutt@ridgerun.com>
Cc: linux-mips@oss.sgi.com, linux-mips@fnet.fr
Subject: Re: insmod hates RELA?
Date: Sat, 07 Oct 2000 00:51:52 +1100	[thread overview]
Message-ID: <23467.970840312@ocs3.ocs-net> (raw)
In-Reply-To: Your message of "Fri, 06 Oct 2000 07:22:14 MDT." <39DDD206.19443FAB@ridgerun.com>

>But I'm not there yet. insmod (2.3.9) now complains about a relocation
>overflow on all of the kernel symbols.

modutils 2.3.9 is quite old, the released version is up to 2.3.17.
ftp.<country>.kernel.org/pub/linux/kernel/utils/modutils/v2.3.

>I'm looking at the source for insmod
>now. At the moment I'm trying to figure out why insmod wants to relocate
>kernel symbols.

It does not relocate kernel symbols, they have fixed values.  What it
does is fix up references from modules to kernel symbols, the modules
have relocation references to external symbols and those external
symbols have to be filled in.

>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.

  parent reply	other threads:[~2000-10-06 13:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <39DCDBA0.8EED1CBD@ridgerun.com>
2000-10-06  2:51 ` insmod hates RELA? Ralf Baechle
2000-10-06 10:26   ` Maciej W. Rozycki
2000-10-06 10:57     ` Keith Owens
2000-10-06 12:05       ` Maciej W. Rozycki
2000-10-06 13:22     ` Gordon McNutt
2000-10-06 13:22       ` Gordon McNutt
2000-10-06 13:51       ` Keith Owens [this message]
2000-10-06 14:52         ` Gordon McNutt
2000-10-06 14:52           ` Gordon McNutt
2000-10-06 15:14         ` Maciej W. Rozycki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=23467.970840312@ocs3.ocs-net \
    --to=kaos@ocs.com.au \
    --cc=gmcnutt@ridgerun.com \
    --cc=linux-mips@fnet.fr \
    --cc=linux-mips@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox