On 10/08/22 14:02, Christophe Leroy wrote:

Le 08/08/2022 à 13:48, Sathvika Vasireddy a écrit :
objtool throws unannotated intra-function call warnings
in the following assembly files.

arch/powerpc/kernel/vector.o: warning: objtool: .text+0x53c: unannotated 
intra-function call

arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0x60: 
unannotated intra-function call
arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0x124: 
unannotated intra-function call
arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0x5d4: 
unannotated intra-function call
arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0x5dc: 
unannotated intra-function call
arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0xcb8: 
unannotated intra-function call
arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0xd0c: 
unannotated intra-function call
arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0x1030: 
unannotated intra-function call

arch/powerpc/kernel/head_64.o: warning: objtool: .text+0x358: unannotated 
intra-function call
arch/powerpc/kernel/head_64.o: warning: objtool: .text+0x728: unannotated 
intra-function call
arch/powerpc/kernel/head_64.o: warning: objtool: .text+0x4d94: unannotated 
intra-function call
arch/powerpc/kernel/head_64.o: warning: objtool: .text+0x4ec4: unannotated 
intra-function call

arch/powerpc/kvm/book3s_hv_interrupts.o: warning: objtool: .text+0x6c: 
unannotated intra-function call
arch/powerpc/kernel/misc_64.o: warning: objtool: .text+0x64: unannotated 
intra-function call

Before explaining how you fix it, can you explain why we get it ?
Sure.

objtool does not add STT_NOTYPE symbols with size 0 to the rbtree, which is why find_call_destination() function is not able to find the destination symbol for 'bl' instruction. For such symbols, objtool is throwing unannotated intra-function call warnings in assembly files. Fix these warnings by adding SYM_FUNC_START_LOCAL() and SYM_FUNC_END() annotations to those symbols to be able to set symbol
type to STT_FUNC and set size of these symbols accordingly.

I'll add this explanation to the commit message.

Thanks for reviewing.

- Sathvika

Reply via email to