public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>,
	Yujie Liu <yujie.liu@intel.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Kent Overstreet <kent.overstreet@linux.dev>,
	kernel test robot <lkp@intel.com>,
	llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Brian Cain <bcain@quicinc.com>,
	linux-hexagon@vger.kernel.org, dwarves@vger.kernel.org
Subject: Re: [bcachefs:header_cleanup 21/51] /bin/bash: line 1: 19420 Segmentation fault LLVM_OBJCOPY="llvm-objcopy" pahole -J --btf_gen_floats -j --lang_exclude=rust --skip_encoding_btf_inconsistent_proto --btf_gen_optimized --btf_base vmlinux drivers/misc/eeprom/at24.ko
Date: Tue, 2 Jan 2024 18:53:42 +0100	[thread overview]
Message-ID: <20240102175342.GH26453@gnu.wildebeest.org> (raw)
In-Reply-To: <ZZQ6CpBnqpBgxSgp@kernel.org>

Hi Arnaldo,

On Tue, Jan 02, 2024 at 01:30:02PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Thu, Dec 28, 2023 at 10:34:04AM -0700, Nathan Chancellor escreveu:
> > On Thu, Dec 28, 2023 at 11:21:06AM -0300, Arnaldo Carvalho de Melo wrote:
> > > Em Wed, Dec 27, 2023 at 03:43:38PM -0700, Nathan Chancellor escreveu:
> > > > I do not get a segfault personally but there are definitely a lot of
> > > > errors from pahole at the end. Arnaldo, is pahole not handling something
> > > > that it should with regards to clang's debug info?
> 
> > > Possibly, would it be possible to provide the vmlinux file where pahole
> > > is segfaulting when trying to encode BTF from DWARF?
> 
> > > These two files:
> 
> > > vmlinux drivers/misc/eeprom/at24.ko
> 
> > > So that I can run:
> > > LLVM_OBJCOPY="llvm-objcopy" pahole -J --btf_gen_floats -j --lang_exclude=rust --skip_encoding_btf_inconsistent_proto --btf_gen_optimized --btf_base vmlinux drivers/misc/eeprom/at24.ko
>  
> > Sure, here you go:
>  
> > https://1drv.ms/u/s!AsQNYeB-IEbqqAilUuGHOU8BMLbf
>  
> > If you need more objects, just let me know. That series of commands in
> > the previous email should also get them for you locally if you need all
> > of them or want to investigate more.
> 
> llvm-dwarfdump is the only that is managing to process this file on a
> fedora:39 system, more work needed to figure out if this is something
> elfutils is planning to support, what amount of work would be necessary,
> etc.
> 
> Mark, do you know about work on elfutils to support:
> 
> ⬢[acme@toolbox hexagon-randconfig-r005-20220913-pahole-crash]$ llvm-dwarfdump at24.ko | head -22
> at24.ko:        file format elf32-hexagon

That seems to identify itself as an EM_QDSP6 (QUALCOMM DSP6) 32bit ELF
file. Neither binutils not elfutils seems to know how to resolve
EM_QDSP6 specific relocations. Normally that wouldn't be necessary,
but sadly kernel modules are still ET_REL files, so eu-readelf/readelf
needs relocations resolved to process the DWARF .debug sections.

This seems to need Qualcomm to upstream support for this processor
type to bintuils and elfutils.

Cheers,

Mark

  reply	other threads:[~2024-01-02 18:02 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-19 13:40 [bcachefs:header_cleanup 21/51] /bin/bash: line 1: 19420 Segmentation fault LLVM_OBJCOPY="llvm-objcopy" pahole -J --btf_gen_floats -j --lang_exclude=rust --skip_encoding_btf_inconsistent_proto --btf_gen_optimized --btf_base vmlinux drivers/misc/eeprom/at24.ko kernel test robot
2023-12-19 20:53 ` Kent Overstreet
2023-12-19 20:58   ` Nick Desaulniers
2023-12-19 21:04     ` Kent Overstreet
2023-12-19 21:04     ` Nathan Chancellor
2023-12-19 21:12       ` [bcachefs:header_cleanup 21/51] /bin/bash: line 1: 19420 Segmentation fault LLVM_OBJCOPY="llvm-objcopy" pahole -J --btf_gen_floats -j --lang_exclude=rust --skip_encoding_btf_inconsistent_proto --btf_gen_optimized --btf_base vmlinux drivers/misc/eep Brian Cain
2023-12-20  7:24       ` [bcachefs:header_cleanup 21/51] /bin/bash: line 1: 19420 Segmentation fault LLVM_OBJCOPY="llvm-objcopy" pahole -J --btf_gen_floats -j --lang_exclude=rust --skip_encoding_btf_inconsistent_proto --btf_gen_optimized --btf_base vmlinux drivers/misc/eeprom/at24.ko Yujie Liu
2023-12-27 22:43         ` Nathan Chancellor
2023-12-28 14:21           ` Arnaldo Carvalho de Melo
2023-12-28 17:34             ` Nathan Chancellor
2024-01-02 16:30               ` Arnaldo Carvalho de Melo
2024-01-02 17:53                 ` Mark Wielaard [this message]
2024-01-03 16:20                   ` Nick Desaulniers
2024-01-03 22:03                     ` Kent Overstreet
2024-01-03 23:55                       ` Nathan Chancellor
2024-01-04 15:10                         ` [bcachefs:header_cleanup 21/51] /bin/bash: line 1: 19420 Segmentation fault LLVM_OBJCOPY="llvm-objcopy" pahole -J --btf_gen_floats -j --lang_exclude=rust --skip_encoding_btf_inconsistent_proto --btf_gen_optimized --btf_base vmlinux drivers/misc/eep Brian Cain
2024-01-03 17:25                   ` Brian Cain
2024-01-03 20:45                     ` Arnaldo Carvalho de Melo
2024-02-09 13:34                       ` Mark Wielaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240102175342.GH26453@gnu.wildebeest.org \
    --to=mark@klomp.org \
    --cc=acme@kernel.org \
    --cc=bcain@quicinc.com \
    --cc=dwarves@vger.kernel.org \
    --cc=kent.overstreet@linux.dev \
    --cc=linux-hexagon@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=yujie.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox