• Andi Kleen's avatar
    [PATCH] Work around gcc 3.3 bug on amd64 in binfmt_elf.c · ea9fcb21
    Andi Kleen authored
    This patch works around a gcc 3.3 bug on AMD64.  On AMD64 the
    get_current() function expands to a switch on sizeof which has to be
    optimized away by the compiler, finally yielding an inline assembler
    statement.  In some cases it seems to get that wrong and forgets to
    reference and use the argument.  I have only seen it happen in
    binfmt_elf so far.
    
    Work around by just computing "current" once.
    ea9fcb21
binfmt_elf.c 38.6 KB