linux-mips
[Top] [All Lists]

Re: Relocation overflow problem with MIPS

To: Madhavi <madhavis@sasken.com>
Subject: Re: Relocation overflow problem with MIPS
From: Ralf Baechle <ralf@linux-mips.org>
Date: Thu, 3 Apr 2003 23:04:51 +0200
Cc: linux-mips@linux-mips.org
In-reply-to: <Pine.LNX.4.33.0304031124100.24014-100000@pcz-madhavis.sasken.com>; from madhavis@sasken.com on Thu, Apr 03, 2003 at 11:25:28AM +0530
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <Pine.LNX.4.33.0304031124100.24014-100000@pcz-madhavis.sasken.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.2.5.1i
On Thu, Apr 03, 2003 at 11:25:28AM +0530, Madhavi wrote:

> I am working on a device driver software for linux kernel version 2.4.19.
> My driver is a loadable module and the size of the module executable is
> approximately 1.4MB.
> 
> When I tried to load this module on x86, I didn't have any problems while
> installing it. On MIPS (R5432) CPU, this is giving the following problems:
> 
> edge_mod.o: Relocation overflow of type 4 for printk

[...]

You must use the same flag to compile modules as the kernel's Makefile.
In particular you were missing -mlong-calls.

> Could anyone tell me what this problem could be? What is relocation
> overflow of type 4? Where can I find the list of all the possible
> relocation overflow types and their descriptions?

Read the source ...

> My module is not compiled using the options -fPIC. Would it make any
> difference if I enable this option?
> 
> I have seen this following comment in modutils-2.4.12/obj/obj_mips.c
> 
> /* _gp_disp is a magic symbol for PIC which is not supported for
>    the kernel and loadable modules.  */
> 
> So, I was thinking that -fPIC wouldn't help much. Am I right?

-fPIC is the compiler default.

> Sasken Business Disclaimer

[legal bullshit disclaimer burried in /dev/zero]

  Ralf

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