lkml.org 
[lkml]   [2016]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] objtool: cope with pre-4.5 gcc (and non-gcc)
On Fri, May 13, 2016 at 12:27:06AM -0600, Jan Beulich wrote:
> The kernel's unreachable() translates to __builtin_unreachable() only
> for gcc 4.5 and newer, and else expands to an infinite loop. Avoid
> "function has unreachable instruction" warnings for this case by
> inspecting the instructions immediately following the UD2. This cuts
> down the number of files getting such warnings by about 99% for me.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Thanks for the patch. I'm wondering if we can detect this situation
more precisely, maybe by adding some kind of annotation to the
unreachable() macro. Will need to think about it a little more...

--
Josh

\
 
 \ /
  Last update: 2016-05-17 00:01    [W:0.048 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site