Thread (32 messages) 32 messages, 5 authors, 2022-08-29

Re: [PATCH 03/16] powerpc: Fix objtool unannotated intra-function call warnings

From: Sathvika Vasireddy <hidden>
Date: 2022-08-18 10:56:09
Also in: linuxppc-dev, lkml

On 10/08/22 14:02, Christophe Leroy wrote:
Le 08/08/2022 à 13:48, Sathvika Vasireddy a écrit :
quoted
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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help