public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Keith Owens <kaos@ocs.com.au>
To: "J . A . Magallon" <jamagallon@able.es>
Cc: Linux Kernel Developer <linux_developer@hotmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: Need info on the use of certain datastructures and the first C++ keyword patch for 2.2.17
Date: Mon, 30 Oct 2000 23:46:30 +1100	[thread overview]
Message-ID: <3626.972909990@ocs3.ocs-net> (raw)
In-Reply-To: Your message of "Mon, 30 Oct 2000 13:00:06 BST." <20001030130006.B1555@werewolf.cps.unizar.es>

On Mon, 30 Oct 2000 13:00:06 +0100, 
"J . A . Magallon" <jamagallon@able.es> wrote:
>And what about struct fields ? It is the same. If you change the name of a field
>permanently, you have to modify the C source that uses it. But names are not
>important for binary compatability, so you can make things like:
>struct data {
>	int field1;
>#ifndef __cplusplus
>	double 	new;
>	int	class;
>#else
>	double	dnew;
>	int	klass;
>#endif
>};

Names *are* important for binary compatibilty on modules.  If you
compile with symbol versions, the field names within a structure are
included in the checksum that is generated for the overall structure.
If you declare different names depending on compile time options then
genksyms says that they are different structure definitions, you will
get a mismatch on the checksum of exported symbols and will not be able
to load the modules.

There is also the less important problem of confusing debuggers.  The
data that is saved when you compile with -g will be different in
various modules, a possible source of confusion.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  reply	other threads:[~2000-10-30 12:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-30 11:09 Need info on the use of certain datastructures and the first C++ keyword patch for 2.2.17 Linux Kernel Developer
2000-10-30 12:00 ` J . A . Magallon
2000-10-30 12:46   ` Keith Owens [this message]
2000-10-31  8:13   ` Linux Kernel Developer
2000-10-30 13:04 ` Alan Cox
2000-10-30 13:20   ` Keith Owens
2000-10-30 13:41     ` Alan Cox
2000-10-30 13:56       ` Keith Owens
2000-10-30 14:02         ` Alan Cox
2000-10-30 14:08           ` Keith Owens
2000-10-30 18:16             ` Alan Cox
2000-10-30 21:04               ` Keith Owens
2000-10-31  8:13   ` Linux Kernel Developer

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=3626.972909990@ocs3.ocs-net \
    --to=kaos@ocs.com.au \
    --cc=jamagallon@able.es \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux_developer@hotmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox