x86/paravirt: Fix callee-saved function ELF sizes
authorJosh Poimboeuf <jpoimboe@redhat.com>
Thu, 18 Jul 2019 01:36:36 +0000 (20:36 -0500)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 18 Jul 2019 19:01:03 +0000 (21:01 +0200)
The __raw_callee_save_*() functions have an ELF symbol size of zero,
which confuses objtool and other tools.

Fixes a bunch of warnings like the following:

  arch/x86/xen/mmu_pv.o: warning: objtool: __raw_callee_save_xen_pte_val() is missing an ELF size annotation
  arch/x86/xen/mmu_pv.o: warning: objtool: __raw_callee_save_xen_pgd_val() is missing an ELF size annotation
  arch/x86/xen/mmu_pv.o: warning: objtool: __raw_callee_save_xen_make_pte() is missing an ELF size annotation
  arch/x86/xen/mmu_pv.o: warning: objtool: __raw_callee_save_xen_make_pgd() is missing an ELF size annotation

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Juergen Gross <jgross@suse.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/afa6d49bb07497ca62e4fc3b27a2d0cece545b4e.1563413318.git.jpoimboe@redhat.com
arch/x86/include/asm/paravirt.h
arch/x86/kernel/kvm.c

index c25c38a05c1c944f7e7c7c51509bee0499705573..d6f5ae2c79ab9e9d75487249891010f778060bea 100644 (file)
@@ -746,6 +746,7 @@ bool __raw_callee_save___native_vcpu_is_preempted(long cpu);
            PV_RESTORE_ALL_CALLER_REGS                                  \
            FRAME_END                                                   \
            "ret;"                                                      \
+           ".size " PV_THUNK_NAME(func) ", .-" PV_THUNK_NAME(func) ";" \
            ".popsection")
 
 /* Get a reference to a callee-save function */
index 82caf01b63dd964148bbef9c8a5e2d920b802d4c..6661bd2f08a612684da3844f1e894c7b3c6bc315 100644 (file)
@@ -838,6 +838,7 @@ asm(
 "cmpb  $0, " __stringify(KVM_STEAL_TIME_preempted) "+steal_time(%rax);"
 "setne %al;"
 "ret;"
+".size __raw_callee_save___kvm_vcpu_is_preempted, .-__raw_callee_save___kvm_vcpu_is_preempted;"
 ".popsection");
 
 #endif