On Mon, 30 Oct 2000 13:00:06 +0100, 
"J . A . Magallon" <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to