{"id":2295,"date":"2018-05-14T11:36:41","date_gmt":"2018-05-14T18:36:41","guid":{"rendered":"http:\/\/rglinuxtech.com\/?p=2295"},"modified":"2018-05-14T11:36:41","modified_gmt":"2018-05-14T18:36:41","slug":"kernel-gcc8-objtool-warnings-patches","status":"publish","type":"post","link":"https:\/\/rglinuxtech.com\/?p=2295","title":{"rendered":"Kernel &#8211; GCC8 \/ &#8216;Objtool Warnings&#8217; Patches.."},"content":{"rendered":"<p>There are now patches available to deal with the host of &#8216;<em>objtool<\/em>&#8216; warnings when compiling the kernel with GCC8:<\/p>\n<pre><span style=\"font-family: courier new, courier;\"><strong>...................................<\/strong><\/span>\r\n<span style=\"font-family: courier new, courier;\"><strong>drivers\/video\/fbdev\/core\/fbmem.o: warning: objtool: fb_set_var()+0x209: sibling call from callable instruction with modified stack frame<\/strong><\/span>\r\n<span style=\"font-family: courier new, courier;\"><strong>drivers\/video\/fbdev\/core\/fbmem.o: warning: objtool: do_remove_conflicting_framebuffers()+0xa6: sibling call from callable instruction with modified stack frame<\/strong><\/span>\r\n<span style=\"font-family: courier new, courier;\"><strong>drivers\/video\/fbdev\/core\/fbmem.o: warning: objtool: register_framebuffer()+0x14b: sibling call from callable instruction with modified stack frame<\/strong><\/span>\r\n<span style=\"font-family: courier new, courier;\"><strong>................... etc....<\/strong><\/span><\/pre>\n<p>More details in this thread:\u00a0 <a href=\"http:\/\/lkml.iu.edu\/hypermail\/linux\/kernel\/1805.1\/02193.html\" target=\"_blank\" rel=\"noopener\">http:\/\/lkml.iu.edu\/hypermail\/linux\/kernel\/1805.1\/02193.html<\/a><\/p>\n<p>I have applied the 3 patches, and with Kernel 4.17 (<strong>4.17-rc5<\/strong>) the compile is now &#8211; relatively &#8211; free from &#8216;warnings&#8217;, apart from a few after executing <code><strong><span style=\"font-family: courier new, courier;\"># make xconfig<\/span><\/strong><\/code>..\u00a0\u00a0\u00a0 The patches also apply cleanly to 4.16 (<strong>4.16.8<\/strong>) and do also remove the <em>objtool<\/em>-related warnings, but still leave a number of &#8216;<em>syscall<\/em>&#8216; and other warnings, which do not occur with 4.17..:<\/p>\n<pre><span style=\"font-family: courier new, courier;\"><strong>..................<\/strong><\/span>\r\n<span style=\"font-family: courier new, courier;\"><strong>.\/include\/linux\/compat.h:52:18: warning: \u2018compat_sys_x86_clone\u2019 alias between functions of incompatible types \u2018long int(long unsigned int, long unsigned int, int *, long unsigned int, int *)\u2019 and \u2018long int(long int, long int, long int, long int, long int)\u2019 [-Wattribute-alias]<\/strong><\/span>\r\n<span style=\"font-family: courier new, courier;\"><strong> asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))\\<\/strong><\/span>\r\n<span style=\"font-family: courier new, courier;\"><strong> ^~~~~~~~~~<\/strong><\/span>\r\n<span style=\"font-family: courier new, courier;\"><strong>.\/include\/linux\/compat.h:47:2: note: in expansion of macro \u2018COMPAT_SYSCALL_DEFINEx\u2019<\/strong><\/span>\r\n<span style=\"font-family: courier new, courier;\"><strong> COMPAT_SYSCALL_DEFINEx(5, _##name, __VA_ARGS__)<\/strong><\/span>\r\n<span style=\"font-family: courier new, courier;\"><strong> ^~~~~~~~~~~~~~~~~~~~~~<\/strong><\/span>\r\n<span style=\"font-family: courier new, courier;\"><strong>arch\/x86\/ia32\/sys_ia32.c:240:1: note: in expansion of macro \u2018COMPAT_SYSCALL_DEFINE5\u2019<\/strong><\/span>\r\n<span style=\"font-family: courier new, courier;\"><strong> COMPAT_SYSCALL_DEFINE5(x86_clone, unsigned long, clone_flags,<\/strong><\/span>\r\n<span style=\"font-family: courier new, courier;\"><strong> ^~~~~~~~~~~~~~~~~~~~~~<\/strong><\/span>\r\n<span style=\"font-family: courier new, courier;\"><strong>.\/include\/linux\/compat.h:56:18: note: aliased declaration here<\/strong><\/span>\r\n<span style=\"font-family: courier new, courier;\"><strong> asmlinkage long compat_SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__))\\<\/strong><\/span>\r\n<span style=\"font-family: courier new, courier;\"><strong> ^~~~~~~~~~<\/strong><\/span>\r\n<span style=\"font-family: courier new, courier;\"><strong>.\/include\/linux\/compat.h:47:2: note: in expansion of macro \u2018COMPAT_SYSCALL_DEFINEx\u2019<\/strong><\/span>\r\n<span style=\"font-family: courier new, courier;\"><strong> COMPAT_SYSCALL_DEFINEx(5, _##name, __VA_ARGS__)<\/strong><\/span>\r\n<span style=\"font-family: courier new, courier;\"><strong> ^~~~~~~~~~~~~~~~~~~~~~<\/strong><\/span>\r\n<span style=\"font-family: courier new, courier;\"><strong>arch\/x86\/ia32\/sys_ia32.c:240:1: note: in expansion of macro \u2018COMPAT_SYSCALL_DEFINE5\u2019<\/strong><\/span>\r\n<span style=\"font-family: courier new, courier;\"><strong> COMPAT_SYSCALL_DEFINE5(x86_clone, unsigned long, clone_flags,<\/strong><\/span>\r\n<span style=\"font-family: courier new, courier;\"><strong>..............\u00a0 (repeated) ...............<\/strong><\/span><\/pre>\n<p>So &#8211; at least with 4.17 Kernels, the GCC8 warnings have been dealt with..\u00a0\u00a0 These patches are still work-in-progress, but hopefully will make it to <em>mainline<\/em> soon..<\/p>\n<p><em>Robert Gadsdon.\u00a0 May 14, 2018.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are now patches available to deal with the host of &#8216;objtool&#8216; warnings when compiling the kernel with GCC8: &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. 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 <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/rglinuxtech.com\/?p=2295\"><span class=\"more-msg\">Continue reading &rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[5,1617,14,15,1533,20],"tags":[1885,1884,1882,1173,1883,1415],"class_list":["post-2295","post","type-post","status-publish","format-standard","hentry","category-compilation","category-gcc","category-kernel","category-linux-2","category-patches","category-performance-2","tag-4-16-syscall-warnings","tag-4-17-clean","tag-gcc8","tag-kernel","tag-objtool-warnings","tag-patches-available"],"_links":{"self":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/2295","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2295"}],"version-history":[{"count":2,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/2295\/revisions"}],"predecessor-version":[{"id":2297,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/2295\/revisions\/2297"}],"wp:attachment":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}