From: Phill W. <um...@we...> - 2005-08-14 06:06:18
|
cc -D__KERNEL__ -I/home/phill/linux-2.4.28/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -U__i386__ -Ui386 -DUM_FASTCALL -g -D__arch_um__ -DSUBARCH=3D"i386" -D_LARGEFILE64_SOURCE -I/home/phill/linux-2.4.28/arch/um/include -Derrno=3Dkernel_errno -I/home/phill/linux-2.4.28/arch/um/kernel/tt/include -I/home/phill/linux-2.4.28/arch/um/kernel/skas/include -fno-unit-at-a-time -nostdinc -iwithprefix include -DKBUILD_BASENAME=3Dbinfmt_elf -save-temps -c -o binfmt_elf.o binfmt_elf.= c In file included from /home/phill/linux-2.4.28/include/asm/byteorder.h:5, from /home/phill/linux-2.4.28/include/linux/kernel.h:16, from /home/phill/linux-2.4.28/include/asm/arch/system.h:6, from /home/phill/linux-2.4.28/include/asm/system-generic.h:5, from /home/phill/linux-2.4.28/include/asm/system.h:5, from /home/phill/linux-2.4.28/include/linux/spinlock.h:7, from /home/phill/linux-2.4.28/include/linux/module.h:13, from binfmt_elf.c:13: /home/phill/linux-2.4.28/include/asm/arch/byteorder.h:14: warning: type qualifiers ignored on function return type /home/phill/linux-2.4.28/include/asm/arch/byteorder.h:30: warning: type qualifiers ignored on function return type In file included from /home/phill/linux-2.4.28/include/linux/byteorder/little_endian.h:12, from /home/phill/linux-2.4.28/include/asm/arch/byteorder.h:66, from /home/phill/linux-2.4.28/include/asm/byteorder.h:5, from /home/phill/linux-2.4.28/include/linux/kernel.h:16, from /home/phill/linux-2.4.28/include/asm/arch/system.h:6, from /home/phill/linux-2.4.28/include/asm/system-generic.h:5, from /home/phill/linux-2.4.28/include/asm/system.h:5, from /home/phill/linux-2.4.28/include/linux/spinlock.h:7, from /home/phill/linux-2.4.28/include/linux/module.h:13, from binfmt_elf.c:13: /home/phill/linux-2.4.28/include/linux/byteorder/swab.h:160: warning: type qualifiers ignored on function return type /home/phill/linux-2.4.28/include/linux/byteorder/swab.h:173: warning: type qualifiers ignored on function return type /home/phill/linux-2.4.28/include/linux/byteorder/swab.h:186: warning: type qualifiers ignored on function return type /home/phill/linux-2.4.28/include/linux/byteorder/swab.h:200: warning: type qualifiers ignored on function return type binfmt_elf.c: In function =E2=80=98load_elf_binary=E2=80=99: binfmt_elf.c:828: error: invalid lvalue in assignment binfmt_elf.c:828: error: invalid lvalue in assignment binfmt_elf.c:828: error: invalid lvalue in assignment binfmt_elf.c:828: error: invalid lvalue in assignment binfmt_elf.c:828: error: invalid lvalue in assignment binfmt_elf.c:828: error: invalid lvalue in assignment binfmt_elf.c:828: error: invalid lvalue in assignment so I looked at the preprocessor output and it showed this for the macro expansion (which looks correct??): do { (mode_tt ? (*((unsigned long *) &(((char *) (((&(regs)->regs)->tt.sc)))[32]))) : ((((&(regs)->regs)->skas.regs)[0]))) =3D 0; (mode_tt ? (*((unsigned long *) &(((char *) (((&(regs)->regs)->tt.sc)))[40]))) : ((((&(regs)->regs)->skas.regs)[1]))) =3D 0; (mode_tt ? (*((unsigned long *) &(((char *) (((&(regs)->regs)->tt.sc)))[36]))) : ((((&(regs)->regs)->skas.regs)[2]))) =3D 0; (mode_tt ? (*((unsigned long *) &(((char *) (((&(regs)->regs)->tt.sc)))[20]))) : ((((&(regs)->regs)->skas.regs)[3]))) =3D 0; (mode_tt ? (*((unsigned long *) &(((char *) (((&(regs)->regs)->tt.sc)))[16]))) : ((((&(regs)->regs)->skas.regs)[4]))) =3D 0; (mode_tt ? (*((unsigned long *) &(((char *) (((&(regs)->regs)->tt.sc)))[24]))) : ((((&(regs)->regs)->skas.regs)[5]))) =3D 0; (mode_tt ? (*((unsigned long *) &(((char *) (((&(regs)->regs)->tt.sc)))[44]))) : ((((&(regs)->regs)->skas.regs)[6]))) =3D 0; } while(0); which I hacked at to produce this (which compiles - don't know if it works or is equivalent even): if (mode_tt) { (*((unsigned long *) &(((char *) (((&(regs)->regs)->tt.sc)))[32]))) =3D 0; (*((unsigned long *) &(((char *) (((&(regs)->regs)->tt.sc)))[40]))) =3D 0; (*((unsigned long *) &(((char *) (((&(regs)->regs)->tt.sc)))[36]))) =3D 0; (*((unsigned long *) &(((char *) (((&(regs)->regs)->tt.sc)))[20]))) =3D 0; (*((unsigned long *) &(((char *) (((&(regs)->regs)->tt.sc)))[16]))) =3D 0; (*((unsigned long *) &(((char *) (((&(regs)->regs)->tt.sc)))[24]))) =3D 0; (*((unsigned long *) &(((char *) (((&(regs)->regs)->tt.sc)))[44]))) =3D 0; } else { ((((&(regs)->regs)->skas.regs)[0])) =3D 0; ((((&(regs)->regs)->skas.regs)[1])) =3D 0; ((((&(regs)->regs)->skas.regs)[2])) =3D 0; ((((&(regs)->regs)->skas.regs)[3])) =3D 0; ((((&(regs)->regs)->skas.regs)[4])) =3D 0; ((((&(regs)->regs)->skas.regs)[5])) =3D 0; ((((&(regs)->regs)->skas.regs)[6])) =3D 0; }; Cheers Phill. |