This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Problem Loading a Module Compiled with GCC 3.4.2
- From: Sandeep Kumar <sandeepksinha at gmail dot com>
- To: Ajitpal Singh <meetajitpal at gmail dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Tue, 17 Jan 2006 11:25:12 +0530
- Subject: Re: Problem Loading a Module Compiled with GCC 3.4.2
- References: <ede2a8d10601122022l7c0d9ec6td90230fdf3f22c9a@mail.gmail.com> <ede2a8d10601122027j687534fey3ea8fec147898afa@mail.gmail.com>
On 1/13/06, Ajitpal Singh <meetajitpal@gmail.com> wrote:
> Hi All,
>
> I have a kernel module which uses a function from a library file( .lib).
>
> This function takes as a paramater a character pointer of string
> buffer and simply prints that string.
>
> This library file has been created by me using ld.
>
> a) When I compile the module and link it with the libary file using
> GCC Version 3.4.2(Supplied with Fedora Core 3,Kernel Version is 2.6.9)
> and insmod it
> I get a Kernel OOPS.
>
>
> b) But if I compile the module with GCC 3.2.2 (Supplied with RedHat 9)
> everything works fine and the module loads successfully.
>
Well, I think it might be due the change in the kernel also. The RH9
has basically a 2.4 kernel and wriitng and compiling modules for a 2.4
kernel is totally different from the way its written for a 2.6
kernel.
The compilation process is totally different in both thses cases.
I also faced the same problem, when i wrote a kernel module for the first time.
So google, writing kernel module for 2.4 kernel and 2.6 kernel, you
will get a way.
--
Regards,
Sandeep
A candle loses nothing if it is used to light another one!