Linux MIPS Architecture development
 help / color / mirror / Atom feed
* Relocation overflow problem with MIPS
@ 2003-04-03  5:55 Madhavi
  2003-04-03  5:55 ` Madhavi
  2003-04-03 21:04 ` Ralf Baechle
  0 siblings, 2 replies; 3+ messages in thread
From: Madhavi @ 2003-04-03  5:55 UTC (permalink / raw)
  To: linux-mips

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1803 bytes --]


Hi

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
edge_mod.o: Relocation overflow of type 4 for printk
edge_mod.o: Relocation overflow of type 4 for printk
edge_mod.o: Relocation overflow of type 4 for alloc_etherdev
edge_mod.o: Relocation overflow of type 4 for printk
edge_mod.o: Relocation overflow of type 4 for printk
edge_mod.o: Relocation overflow of type 4 for pci_enable_device
edge_mod.o: Relocation overflow of type 4 for pci_set_dma_mask
edge_mod.o: Relocation overflow of type 4 for printk
edge_mod.o: Relocation overflow of type 4 for pci_find_capability
.........................

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?

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?

Any help in this regard would be greatly appreciated.

Thank you in advance.

regards
Madhavi.

Madhavi Suram
Software Engineer
Customer Delivery / Networks
Sasken Communication Technologies Limited
139/25, Ring Road, Domlur
Bangalore - 560071 India
Email: madhavis@sasken.com
Tel: + 91 80 5355501 Extn: 8062
Fax: + 91 80 5351133
URL: www.sasken.com


[-- Attachment #2: Type: text/plain, Size: 909 bytes --]

************************************************************************

Sasken Business Disclaimer

This  message may  contain  confidential,  proprietary  or  legally privileged  information. In  case  you are not the original intended recipient of the message, you must not, directly or indirectly, use,  disclose,  distribute,  print,  or copy  any  part of  this  message and you are requested to delete it and inform the sender. Any views  expressed in this message are those of the individual sender unless otherwise stated. Nothing contained in this message shall be construed as an offer or acceptance of any offer by Sasken Communication Technologies Limited ("Sasken") unless sent with that express intent and with due authority of Sasken. Sasken accepts no liability for any loss or damage, which may be caused by viruses.

***********************************************************************

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Relocation overflow problem with MIPS
  2003-04-03  5:55 Relocation overflow problem with MIPS Madhavi
@ 2003-04-03  5:55 ` Madhavi
  2003-04-03 21:04 ` Ralf Baechle
  1 sibling, 0 replies; 3+ messages in thread
From: Madhavi @ 2003-04-03  5:55 UTC (permalink / raw)
  To: linux-mips

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1803 bytes --]


Hi

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
edge_mod.o: Relocation overflow of type 4 for printk
edge_mod.o: Relocation overflow of type 4 for printk
edge_mod.o: Relocation overflow of type 4 for alloc_etherdev
edge_mod.o: Relocation overflow of type 4 for printk
edge_mod.o: Relocation overflow of type 4 for printk
edge_mod.o: Relocation overflow of type 4 for pci_enable_device
edge_mod.o: Relocation overflow of type 4 for pci_set_dma_mask
edge_mod.o: Relocation overflow of type 4 for printk
edge_mod.o: Relocation overflow of type 4 for pci_find_capability
.........................

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?

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?

Any help in this regard would be greatly appreciated.

Thank you in advance.

regards
Madhavi.

Madhavi Suram
Software Engineer
Customer Delivery / Networks
Sasken Communication Technologies Limited
139/25, Ring Road, Domlur
Bangalore - 560071 India
Email: madhavis@sasken.com
Tel: + 91 80 5355501 Extn: 8062
Fax: + 91 80 5351133
URL: www.sasken.com


[-- Attachment #2: Type: text/plain, Size: 909 bytes --]

************************************************************************

Sasken Business Disclaimer

This  message may  contain  confidential,  proprietary  or  legally privileged  information. In  case  you are not the original intended recipient of the message, you must not, directly or indirectly, use,  disclose,  distribute,  print,  or copy  any  part of  this  message and you are requested to delete it and inform the sender. Any views  expressed in this message are those of the individual sender unless otherwise stated. Nothing contained in this message shall be construed as an offer or acceptance of any offer by Sasken Communication Technologies Limited ("Sasken") unless sent with that express intent and with due authority of Sasken. Sasken accepts no liability for any loss or damage, which may be caused by viruses.

***********************************************************************

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Relocation overflow problem with MIPS
  2003-04-03  5:55 Relocation overflow problem with MIPS Madhavi
  2003-04-03  5:55 ` Madhavi
@ 2003-04-03 21:04 ` Ralf Baechle
  1 sibling, 0 replies; 3+ messages in thread
From: Ralf Baechle @ 2003-04-03 21:04 UTC (permalink / raw)
  To: Madhavi; +Cc: linux-mips

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-04-03 21:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-03  5:55 Relocation overflow problem with MIPS Madhavi
2003-04-03  5:55 ` Madhavi
2003-04-03 21:04 ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox