[lkml]   [1999]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Mixing egcs and gcc- compiled code: struct alignment issues?
On Tue, 20 Jul 1999, Steve Dodd wrote:

> Does this mean that the compilers are padding struct inode *differently*,
> resulting in u.generic_ip being at different offsets? That's a nightmare :(

I've been bitten by this before. The linux kernel source is at
fault, classic example is in include/asm-i386/spinlock.h

#if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)
typedef struct { } rwlock_t;
#define RW_LOCK_UNLOCKED (rwlock_t) { }
typedef struct { int gcc_is_buggy; } rwlock_t;
#define RW_LOCK_UNLOCKED (rwlock_t) { 0 }

Any structure incorporating these lock types will thus be differing sizes
depending on your version of gcc. grep the source carefully for "GNUC"

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:53    [W:0.058 / U:3.984 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site