x86/asm/entry: Annotate THUNKs
authorJiri Slaby <jslaby@suse.cz>
Fri, 11 Oct 2019 11:50:44 +0000 (13:50 +0200)
committerBorislav Petkov <bp@suse.de>
Fri, 18 Oct 2019 07:58:59 +0000 (09:58 +0200)
commit76dc6d600166de2c0482db95318534e6dc284212
treea13a9bcd4d310e551034b4184c881a47163cca64
parent6ec2a968247e51535e08dbbbfc8f53c95a48cde0
x86/asm/entry: Annotate THUNKs

Place SYM_*_START_NOALIGN and SYM_*_END around the THUNK macro body.
Preserve @function by FUNC (64bit) and CODE (32bit). Given it was not
marked as aligned, use NOALIGN.

The result:
 Value  Size Type    Bind   Vis      Ndx Name
  0000    28 FUNC    GLOBAL DEFAULT    1 trace_hardirqs_on_thunk
  001c    28 FUNC    GLOBAL DEFAULT    1 trace_hardirqs_off_thunk
  0038    24 FUNC    GLOBAL DEFAULT    1 lockdep_sys_exit_thunk
  0050    24 FUNC    GLOBAL DEFAULT    1 ___preempt_schedule
  0068    24 FUNC    GLOBAL DEFAULT    1 ___preempt_schedule_notra

The annotation of .L_restore does not generate anything (at the moment).
Here, it just serves documentation purposes (as opening and closing
brackets of functions).

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: linux-arch@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: x86-ml <x86@kernel.org>
Link: https://lkml.kernel.org/r/20191011115108.12392-5-jslaby@suse.cz
arch/x86/entry/thunk_32.S
arch/x86/entry/thunk_64.S