linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Segfault in pahole 1.18 when building kernel 5.9.1 for arm64
@ 2020-10-18 23:18 Érico Rolim
  2020-10-20  9:01 ` Jiri Slaby
  0 siblings, 1 reply; 14+ messages in thread
From: Érico Rolim @ 2020-10-18 23:18 UTC (permalink / raw)
  To: dwarves, linux-kernel

Hi!

I'm trying to build kernel 5.9.1 for arm64, and my dotconfig has
`CONFIG_DEBUG_INFO_BTF=y`, which requires pahole for building. However, pahole
version 1.18 segfaults during the build, as can be seen below:

PAHOLE: Error: Found symbol of zero size when encoding btf (sym:
'__kvm_nvhe_arm64_ssbd_callback_required', cu:
'arch/arm64/kernel/cpu_errata.c').
PAHOLE: Error: Use '-j' or '--force' to ignore such symbols and force
emit the btf.
scripts/link-vmlinux.sh: line 141: 43837 Segmentation fault
LLVM_OBJCOPY=${OBJCOPY} ${PAHOLE} -J ${1}
  LD      .tmp_vmlinux.kallsyms1
  KSYM    .tmp_vmlinux.kallsyms1.o
  LD      .tmp_vmlinux.kallsyms2
  KSYM    .tmp_vmlinux.kallsyms2.o
  LD      vmlinux
  BTFIDS  vmlinux
FAILED: load BTF from vmlinux: Unknown error -2make: ***
[Makefile:1162: vmlinux] Error 255

It is possible to force the build to continue if

  LLVM_OBJCOPY=${OBJCOPY} ${PAHOLE} -J ${1}

in scripts/link-vmlinux.sh is changed to

  LLVM_OBJCOPY=${OBJCOPY} ${PAHOLE} -J --btf_encode_force ${1}

The suggested `-j` or `--force` flags don't exist, since they were removed in
[1]. I believe `--btf_encode_force` should be suggested instead.

It should be noted that the same build, but with pahole version 1.17, works
without issue, so I think this is either a regression in pahole or the script
will need to be changed for newer versions of pahole.

- [1] https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/pahole.c?h=v1.18&id=1abc001417b579b86a9b27ff88c9095d8f498a46

Thanks,
Érico

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-10-21 16:26 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-18 23:18 Segfault in pahole 1.18 when building kernel 5.9.1 for arm64 Érico Rolim
2020-10-20  9:01 ` Jiri Slaby
2020-10-20 12:20   ` Arnaldo Carvalho de Melo
2020-10-20 17:04     ` Hao Luo
2020-10-20 17:10       ` Andrii Nakryiko
2020-10-20 17:18         ` Hao Luo
2020-10-20 18:14         ` Arnaldo Carvalho de Melo
2020-10-20 19:02           ` Arnaldo Carvalho de Melo
2020-10-21  6:22     ` Jiri Slaby
2020-10-21 11:29       ` Arnaldo Carvalho de Melo
2020-10-21 15:53         ` Andrii Nakryiko
2020-10-21 16:26           ` Arnaldo Carvalho de Melo
2020-10-20 17:15   ` Andrii Nakryiko
2020-10-21  5:52     ` Jiri Slaby

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).