[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.020 / U:78.684 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site