linux_dsm_epyc7002/arch/powerpc/tools
Alexandre Ghiti 43e76cd368 powerpc: Do not consider weak unresolved symbol relocations as bad
Commit 8580ac9404 ("bpf: Process in-kernel BTF") introduced two weak
symbols that may be unresolved at link time which result in an absolute
relocation to 0. relocs_check.sh emits the following warning:

"WARNING: 2 bad relocations
c000000001a41478 R_PPC64_ADDR64    _binary__btf_vmlinux_bin_start
c000000001a41480 R_PPC64_ADDR64    _binary__btf_vmlinux_bin_end"

whereas those relocations are legitimate even for a relocatable kernel
compiled with -pie option.

relocs_check.sh already excluded some weak unresolved symbols explicitly:
remove those hardcoded symbols and add some logic that parses the symbols
using nm, retrieves all the weak unresolved symbols and excludes those from
the list of the potential bad relocations.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Alexandre Ghiti <alex@ghiti.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200118170335.21440-1-alex@ghiti.fr
2020-01-31 20:17:22 +11:00
..
checkpatch.sh powerpc/tools/checkpatch: Ignore DT_SPLIT_BINDING_PATCH 2018-12-04 19:45:01 +11:00
gcc-check-mprofile-kernel.sh powerpc/kbuild: move -mprofile-kernel check to Kconfig 2018-06-11 09:16:29 +09:00
head_check.sh powerpc/64: Tool to check head sections location sanity 2017-05-30 14:59:51 +10:00
relocs_check.sh powerpc: Do not consider weak unresolved symbol relocations as bad 2020-01-31 20:17:22 +11:00
unrel_branch_check.sh powerpc/tools: Don't quote $objdump in scripts 2019-10-30 22:55:12 +11:00