summaryrefslogtreecommitdiffstats
path: root/drivers/fsi
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@redhat.com>2018-06-01 07:23:51 -0500
committerThomas Gleixner <tglx@linutronix.de>2018-06-06 14:45:22 +0200
commitcd77849a69cf5d81a86dd88dac7a594a67cb5c87 (patch)
treee17ab5c6f2e1ba2920852e08e7cb25b94c377a70 /drivers/fsi
parent716a685fdb89942a50c4138141027e38336a895f (diff)
downloadlinux-cd77849a69cf5d81a86dd88dac7a594a67cb5c87.tar.bz2
objtool: Fix GCC 8 cold subfunction detection for aliased functions
The kbuild test robot reported the following issue: kernel/time/posix-stubs.o: warning: objtool: sys_ni_posix_timers.cold.1()+0x0: unreachable instruction This file creates symbol aliases for the sys_ni_posix_timers() function. So there are multiple ELF function symbols for the same function: 23: 0000000000000150 26 FUNC GLOBAL DEFAULT 1 __x64_sys_timer_create 24: 0000000000000150 26 FUNC GLOBAL DEFAULT 1 sys_ni_posix_timers 25: 0000000000000150 26 FUNC GLOBAL DEFAULT 1 __ia32_sys_timer_create 26: 0000000000000150 26 FUNC GLOBAL DEFAULT 1 __x64_sys_timer_gettime Here's the corresponding cold subfunction: 11: 0000000000000000 45 FUNC LOCAL DEFAULT 6 sys_ni_posix_timers.cold.1 When analyzing overlapping functions, objtool only looks at the first one in the symbol list. The rest of the functions are basically ignored because they point to instructions which have already been analyzed. So in this case it analyzes the __x64_sys_timer_create() function, but then it fails to recognize that its cold subfunction is sys_ni_posix_timers.cold.1(), because the names are different. Make the subfunction detection a little smarter by associating each subfunction with the first function which jumps to it, since that's the one which will be analyzed. Unfortunately we still have to leave the original subfunction detection code in place, thanks to GCC switch tables. (See the comment for more details.) Fixes: 13810435b9a7 ("objtool: Support GCC 8's cold subfunctions") Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lkml.kernel.org/r/d3ba52662cbc8e3a64a3b64d44b4efc5674fd9ab.1527855808.git.jpoimboe@redhat.com
Diffstat (limited to 'drivers/fsi')
0 files changed, 0 insertions, 0 deletions