Kernel – GCC8 / ‘Objtool Warnings’ Patches..
There are now patches available to deal with the host of ‘objtool‘ warnings when compiling the kernel with GCC8:
................................... drivers/video/fbdev/core/fbmem.o: warning: objtool: fb_set_var()+0x209: sibling call from callable instruction with modified stack frame drivers/video/fbdev/core/fbmem.o: warning: objtool: do_remove_conflicting_framebuffers()+0xa6: sibling call from callable instruction with modified stack frame drivers/video/fbdev/core/fbmem.o: warning: objtool: register_framebuffer()+0x14b: sibling call from callable instruction with modified stack frame ................... etc....
More details in this thread: http://lkml.iu.edu/hypermail/linux/kernel/1805.1/02193.html
I have applied the 3 patches, and with Kernel 4.17 (4.17-rc5) the compile is now – relatively – free from ‘warnings’, apart from a few after executing # make xconfig
.. The patches also apply cleanly to 4.16 (4.16.8) and do also remove the objtool-related warnings, but still leave a number of ‘syscall‘ and other warnings, which do not occur with 4.17..:
.................. ./include/linux/compat.h:52:18: warning: ‘compat_sys_x86_clone’ alias between functions of incompatible types ‘long int(long unsigned int, long unsigned int, int *, long unsigned int, int *)’ and ‘long int(long int, long int, long int, long int, long int)’ [-Wattribute-alias] asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))\ ^~~~~~~~~~ ./include/linux/compat.h:47:2: note: in expansion of macro ‘COMPAT_SYSCALL_DEFINEx’ COMPAT_SYSCALL_DEFINEx(5, _##name, __VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~ arch/x86/ia32/sys_ia32.c:240:1: note: in expansion of macro ‘COMPAT_SYSCALL_DEFINE5’ COMPAT_SYSCALL_DEFINE5(x86_clone, unsigned long, clone_flags, ^~~~~~~~~~~~~~~~~~~~~~ ./include/linux/compat.h:56:18: note: aliased declaration here asmlinkage long compat_SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__))\ ^~~~~~~~~~ ./include/linux/compat.h:47:2: note: in expansion of macro ‘COMPAT_SYSCALL_DEFINEx’ COMPAT_SYSCALL_DEFINEx(5, _##name, __VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~ arch/x86/ia32/sys_ia32.c:240:1: note: in expansion of macro ‘COMPAT_SYSCALL_DEFINE5’ COMPAT_SYSCALL_DEFINE5(x86_clone, unsigned long, clone_flags, .............. (repeated) ...............
So – at least with 4.17 Kernels, the GCC8 warnings have been dealt with.. These patches are still work-in-progress, but hopefully will make it to mainline soon..
Robert Gadsdon. May 14, 2018.
Comments
Kernel – GCC8 / ‘Objtool Warnings’ Patches.. — No Comments