Skip to contentSkip to conversation

errors while insmoding usb-skeleton.o (changed to suit our requirements)

DISCUSSION Ralf Baechle 2 participants 4 messages Oct 26, 2004 – Oct 27, 2004 1 message not in the archive MIPS

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 000b01c4bb6a$f87b1580$0e00a8c0@narendra

#1 lore raw
Quoted 11 lines · Narendra Kulkarni

I am building a module usb-skeleton.o with following compiler options (The complier options are same as the options of used for building kernel)

/opt/brcm/hndtools-mipsel-linux-3.2.3/bin/mipsel-linux-gcc -D__KERNEL__ -I/ usr/src/mipslinux/src/linux/linux/include -Wall -Wstrict-prototypes -Wno-tri graphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -I/usr/src/ mipslinux/src/linux/linux/../../include -I/usr/src/mipslinux/src/linux/linux /include/asm/gcc -G
-mno-abicalls -fno-pic -pipe -mips2 -mlong-calls -nostdinc -iwithprefix
include -DKBUILD_BASENAME=usb-skeleton -c -o usb-skeleton.o usb-skeleton.c

Quoted 8 lines

When insmoding the usb-skeleton.o, insmod usb-skeleton.o
I am getting the following erros
Using usb-skeleton.o
insmod: Relocation overflow of type 4 for __copy_user
insmod: Relocation overflow of type 4 for __copy_user
insmod: Relocation overflow of type 4 for __copy_user

Where am i going wrong. Help would be appreciated.

Seems your compiler command line is missing -DMODULE.

Ralf

#2 lore raw

Hello Ralf,
I think if we use -DKBUILD_BASENAME, we dont need -DMODULE. Correct me if i am wrong

Narendra

----- Original Message -----
From: "Ralf Baechle" <[email protected]>
To: "Narendra Kulkarni" <[email protected]>
Cc: "'Narendra Kulkarni'" <[email protected]>; <[email protected]>
Sent: Tuesday, October 26, 2004 8:34 PM
Subject: Re: errors while insmoding usb-skeleton.o (changed to suit our requirements)

Quoted 3 lines · Narendra Kulkarni
Quoted 2 lines

I am building a module usb-skeleton.o with following compiler options

(The

Quoted 3 lines
Quoted 3 lines

complier options are same as the options of used for building kernel)

opt/brcm/hndtools-mipsel-linux-3.2.3/bin/mipsel-linux-gcc -D__KERNEL__ -I/

Quoted 1 line
Quoted 1 line

usr/src/mipslinux/src/linux/linux/include -Wall -Wstrict-prototypes -Wno-tri

Quoted 1 line
Quoted 1 line

graphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -I/usr/src/

Quoted 1 line
Quoted 1 line

mipslinux/src/linux/linux/../../include -I/usr/src/mipslinux/src/linux/linux

Quoted 4 lines
Quoted 1 line

/include/asm/gcc -G

-mno-abicalls -fno-pic -pipe -mips2 -mlong-calls -nostdinc -iwithprefix

Quoted 1 line

include -DKBUILD_BASENAME=usb-skeleton -c -o usb-skeleton.o

usb-skeleton.c

Quoted 15 lines
Quoted 9 lines

When insmoding the usb-skeleton.o, insmod usb-skeleton.o
I am getting the following erros
Using usb-skeleton.o
insmod: Relocation overflow of type 4 for __copy_user
insmod: Relocation overflow of type 4 for __copy_user
insmod: Relocation overflow of type 4 for __copy_user

Where am i going wrong. Help would be appreciated.

Seems your compiler command line is missing -DMODULE.

Ralf

#3 lore raw
Quoted 3 lines · Narendra Kulkarni

Hello Ralf,
I think if we use -DKBUILD_BASENAME, we dont need -DMODULE. Correct me if i am wrong

Nope.

Ralf

#4 lore raw
In reply to Ralf Baechle

Hi,

I have used the functions copy_to_user and copy_from_user in the driver to get and send data to user space. If I comment the above statements, i dont get the errors when i insmod usb-skeleton.o which i get when i use the copy_to_user and copy _from_user functions.
errors --->

Using usb-skeleton.o
insmod: Relocation overflow of type 4 for __copy_user
insmod: Relocation overflow of type 4 for __copy_user
insmod: Relocation overflow of type 4 for __copy_user

Narendra

----- Original Message -----
From: "Ralf Baechle" <[email protected]>
To: "Narendra Kulkarni" <[email protected]>
Cc: "'Narendra Kulkarni'" <[email protected]>; <[email protected]>
Sent: Tuesday, October 26, 2004 8:34 PM
Subject: Re: errors while insmoding usb-skeleton.o (changed to suit our requirements)

Quoted 3 lines · Narendra Kulkarni
Quoted 2 lines

I am building a module usb-skeleton.o with following compiler options

(The

Quoted 3 lines
Quoted 3 lines

complier options are same as the options of used for building kernel)

opt/brcm/hndtools-mipsel-linux-3.2.3/bin/mipsel-linux-gcc -D__KERNEL__ -I/

Quoted 1 line
Quoted 1 line

usr/src/mipslinux/src/linux/linux/include -Wall -Wstrict-prototypes -Wno-tri

Quoted 1 line
Quoted 1 line

graphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -I/usr/src/

Quoted 1 line
Quoted 1 line

mipslinux/src/linux/linux/../../include -I/usr/src/mipslinux/src/linux/linux

Quoted 4 lines
Quoted 1 line

/include/asm/gcc -G

-mno-abicalls -fno-pic -pipe -mips2 -mlong-calls -nostdinc -iwithprefix

Quoted 1 line

include -DKBUILD_BASENAME=usb-skeleton -c -o usb-skeleton.o

usb-skeleton.c

Quoted 15 lines
Quoted 9 lines

When insmoding the usb-skeleton.o, insmod usb-skeleton.o
I am getting the following erros
Using usb-skeleton.o
insmod: Relocation overflow of type 4 for __copy_user
insmod: Relocation overflow of type 4 for __copy_user
insmod: Relocation overflow of type 4 for __copy_user

Where am i going wrong. Help would be appreciated.

Seems your compiler command line is missing -DMODULE.

Ralf