[PATCH 3/7] powerpc/64s: tool to flag direct branches from unrelocated interrupt vectors

Michael Ellerman mpe at ellerman.id.au
Wed Oct 19 21:57:21 AEDT 2016


Nicholas Piggin <npiggin at gmail.com> writes:

> Direct banches from code below __end_interrupts to code above
> __end_interrupts when built with CONFIG_RELOCATABLE are disallowed
> because they will break when the kernel is not located at 0.
>
> Sample output:
>
>     WARNING: Unrelocated relative branches
>     c000000000000118 bl-> 0xc000000000038fb8 <pnv_restore_hyp_resource>
>     c00000000000013c b-> 0xc0000000001068a4 <kvm_start_guest>
>     c000000000000148 b-> 0xc00000000003919c <pnv_wakeup_loss>
>     c00000000000014c b-> 0xc00000000003923c <pnv_wakeup_noloss>
>     c0000000000005a4 b-> 0xc000000000106ffc <kvmppc_interrupt_hv>
>     c000000000001af0 b-> 0xc000000000106ffc <kvmppc_interrupt_hv>
>     c000000000001b24 b-> 0xc000000000106ffc <kvmppc_interrupt_hv>
>     c000000000001b58 b-> 0xc000000000106ffc <kvmppc_interrupt_hv>
>
> Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
> ---
>  arch/powerpc/Makefile.postlink           |  9 ++++-
>  arch/powerpc/tools/unrel_branch_check.sh | 56 ++++++++++++++++++++++++++++++++

arch/powerpc/scripts is meant for these kind of scripts (there's only
one there ATM, and yes we should move others in there).

cheers


More information about the Linuxppc-dev mailing list