diff options
author | Steven Rostedt <[email protected]> | 2016-10-24 15:01:48 -0400 |
---|---|---|
committer | Thomas Gleixner <[email protected]> | 2016-10-26 12:38:17 +0200 |
commit | 5de0a8c0c240338cb5b73363b0673c6aa804bb1c (patch) | |
tree | 29581fb848137b041427007cc9603435383bd29b /scripts | |
parent | d320b9a5bd85f6178cc3ed8b0a1a9960f2b5bc7b (diff) |
x86: Fix export for mcount and __fentry__
Commit 784d5699eddc5 ("x86: move exports to actual definitions") removed the
EXPORT_SYMBOL(__fentry__) and EXPORT_SYMBOL(mcount) from x8664_ksyms_64.c,
and added EXPORT_SYMBOL(function_hook) in mcount_64.S instead. The problem
is that function_hook isn't a function at all, but a macro that is defined
as either mcount or __fentry__ depending on the support from gcc.
Originally, I thought this was a macro issue, like what __stringify()
is used for. But the problem is a bit deeper. The Makefile.build has
some magic that does post processing of files to create the CRC
bindings. It does some searches for EXPORT_SYMBOL() and because it
finds a macro name and not the actual functions, this causes
function_hook not to be converted into mcount or __fentry__ and they
are missed.
Instead of adding more magic to Makefile.build, just add
EXPORT_SYMBOL() for mcount and __fentry__ where the ifdef is used.
Since this is assembly and not C, it doesn't require being set after
the function is defined.
Signed-off-by: Steven Rostedt <[email protected]>
Tested-by: Borislav Petkov <[email protected]>
Cc: Gabriel C <[email protected]>
Cc: Nicholas Piggin <[email protected]>
Cc: Al Viro <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions