mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Emmanuel Michon <emmanuel_michon@realmagic.fr>
To: linux-kernel@vger.kernel.org
Subject: binary compatibity (mixing different gcc versions) in modules
Date: 17 Jun 2002 14:36:25 +0200	[thread overview]
Message-ID: <7w3cvmdquu.fsf@avalon.france.sdesigns.com> (raw)

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?

Everything is compiled with:
cc 
 -O2 
 -DDEBUG=1
 -D__KERNEL__
 -DMODULE 
 -fomit-frame-pointer 
 -fno-strict-aliasing 
 -fno-common 
 -pipe 
 -mpreferred-stack-boundary=2  
 -Wno-import 
 -Wimplicit 
 -Wmain 
 -Wreturn-type 
 -Wswitch 
 -Wtrigraphs 
 -Wchar-subscripts 
 -Wuninitialized 
 -Wparentheses 
 -Wpointer-arith 
 -Wcast-align 
 -fcheck-new

One gcc is 
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)
the other one is 2.95-2.

Would -O1 be a safer choice?

Sincerely yours,

PS. Let's avoid to fall in a open source vs. binary only dialectics
here, it's not really the point ;-)

-- 
Emmanuel Michon
Chef de projet
REALmagic France SAS
Mobile: 0614372733 GPGkeyID: D2997E42  

             reply	other threads:[~2002-06-17 12:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-17 12:36 Emmanuel Michon [this message]
2002-06-17 13:11 ` Richard B. Johnson
2002-06-17 21:25   ` J Sloan
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=7w3cvmdquu.fsf@avalon.france.sdesigns.com \
    --to=emmanuel_michon@realmagic.fr \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®