From: J Sloan <jjs@lexus.com>
To: root@chaos.analogic.com
Cc: Emmanuel Michon <emmanuel_michon@realmagic.fr>,
linux-kernel@vger.kernel.org
Subject: Re: binary compatibity (mixing different gcc versions) in modules
Date: Mon, 17 Jun 2002 14:25:44 -0700 [thread overview]
Message-ID: <3D0E53D8.2020407@lexus.com> (raw)
In-Reply-To: Pine.LNX.3.95.1020617085231.12517B-100000@chaos.analogic.com
I always compile the nvidia tarball against
whatever kernel I'm running - it has been
quite stable thus used, and I've used it with
stock RH kernels, -ac kernels, -aa kernels
and 2.5 kernels...
Joe
Richard B. Johnson wrote:
>On 17 Jun 2002, Emmanuel Michon wrote:
>
>
>
>>Hi,
>>
>>looking at nvidia proprietary driver, the makefile warns
>>the user against insmod'ing a module compiled with a gcc
>>version different from the one that was used to compile
>>the kernel.
>>
>>This sounds strange to me, since I never encountered this
>>problem.
>>
>>As a counterpart, what I'm sure of, is that you easily get system
>>crashes when insmod'ing a module resulting of the linking together
>>(with ld -r) of object files (.o) that were not produced by the same gcc.
>>
>>Can someone give me a clue on what happens?
>>
>>
>>
>
>Nothing happens if you don't use -fcaller-saves or some other such
>optimization(s). Even -fomit-frame-pointer is safe across called
>functions so there should not be a problem mixing and matching.
>
>Note that your 'C' runtime library was probably not created by your
>current C Compiler and your user-mode C programs probably run just
>fine.
>
>Very old GNU C compilers followed the "M$" convention of prepending
>an underscore on a global variable. Therefore "main:" became "_main:".
>With such a compiler output, the linker will have trouble.
>
>If you link together certain objects to make a module, you must
>ascertain that the objects were produced using the same kernel
>structures (read identical kernel version). As an example, the
>main module structure, used by the kernel to find out where your
>module's procedures are, is called: "struct file_operations".
>The first structure member used to be a pointer to lseek(), now
>it's an opaque object of type THIS_MODULE.
>
>Imagine the fun if you made a module with this mixup!
>
>Cheers,
>Dick Johnson
>
>Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips).
>
> Windows-2000/Professional isn't.
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
>
>
>
next prev parent reply other threads:[~2002-06-17 21:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-17 12:36 binary compatibity (mixing different gcc versions) in modules Emmanuel Michon
2002-06-17 13:11 ` Richard B. Johnson
2002-06-17 21:25 ` J Sloan [this message]
2002-06-18 0:24 ` Andi Kleen
2002-06-18 16:11 ` andrew may
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=3D0E53D8.2020407@lexus.com \
--to=jjs@lexus.com \
--cc=emmanuel_michon@realmagic.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=root@chaos.analogic.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.