All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: "Martin Liška" <mliska@suse.cz>
Cc: dwarves@vger.kernel.org, Nick Clifton <nickc@redhat.com>
Subject: Re: Encountered error while encoding BTF due to Unsupported DW_TAG_unspecified_type(0x3b)
Date: Wed, 5 Oct 2022 12:43:49 -0300	[thread overview]
Message-ID: <Yz2mNfP2mmqAhkUn@kernel.org> (raw)
In-Reply-To: <Yz2Wmd0WgiwmPglm@kernel.org>

Em Wed, Oct 05, 2022 at 11:37:13AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Wed, Oct 05, 2022 at 09:23:32AM +0200, Martin Liška escreveu:
> > On 10/4/22 23:44, Arnaldo Carvalho de Melo wrote:
> > > I assume "binutils master" means:
> > > 
> > > git://sourceware.org/git/binutils-gdb.git master?
> > 
> > Yes.
> 
> Taking notes:
> 
> Using what is in opensuse:tumbleweed it works:

So I built and installed from git://sourceware.org/git/binutils-gdb.git,
it got on /usr/local/bin, taking precedence above /usr/bin/, and didn't
get any DW_TAG_unspecified_type:

15e20ce2324a:~/git/linux # type readelf
readelf is hashed (/usr/local/bin/readelf)
15e20ce2324a:~/git/linux # /usr/local/bin/readelf -v
GNU readelf (GNU Binutils) 2.39.50.20221005
Copyright (C) 2022 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.
15e20ce2324a:~/git/linux # rpm -q binutils
binutils-2.38-6.2.x86_64
15e20ce2324a:~/git/linux #

15e20ce2324a:~/git/linux # readelf -wi ../build/v6.0.0+binutils-latest/vmlinux|grep DW_TAG_unspecified_type
15e20ce2324a:~/git/linux #

15e20ce2324a:~/git/linux # egrep BTF\|DWARF\|PAHOLE ../build/v6.0.0+binutils-latest/.config
CONFIG_PAHOLE_VERSION=122
CONFIG_VIDEO_SONY_BTF_MPX=m
CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
# CONFIG_DEBUG_INFO_DWARF4 is not set
# CONFIG_DEBUG_INFO_DWARF5 is not set
CONFIG_DEBUG_INFO_BTF=y
CONFIG_PAHOLE_HAS_SPLIT_BTF=y
CONFIG_DEBUG_INFO_BTF_MODULES=y
# CONFIG_MODULE_ALLOW_BTF_MISMATCH is not set
15e20ce2324a:~/git/linux #


Its CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y and it ends up being
DWARF5 as its the toolchain default, at least from the
/usr/local/bin/readelf -wi output below.

Can you hand me your kernel .config file, please?


 <1><92163>: Abbrev Number: 0
  Compilation Unit @ offset 0x92164:
   Length:        0x24 (32-bit)
   Version:       5
   Unit Type:     DW_UT_compile (1)
   Abbrev Offset: 0x5555
   Pointer Size:  8
 <0><92170>: Abbrev Number: 1 (DW_TAG_compile_unit)
    <92171>   DW_AT_stmt_list   : 0x7df2
    <92175>   DW_AT_low_pc      : 0xffffffff81c62000
    <9217d>   DW_AT_high_pc     : 19
    <9217e>   DW_AT_name        : (indirect string, offset: 0x1878d): /root/git/linux/arch/x86/entry/entry.S
    <92182>   DW_AT_comp_dir    : (indirect string, offset: 0x2a): /root/git/build/v6.0.0+binutils-latest
    <92186>   DW_AT_producer    : (indirect string, offset: 0x51): GNU AS 2.38
    <9218a>   DW_AT_language    : 32769 (MIPS assembler)
  Compilation Unit @ offset 0x9218c:
   Length:        0x1f (32-bit)
   Version:       5
   Unit Type:     DW_UT_compile (1)
   Abbrev Offset: 0x5569
   Pointer Size:  8
 <0><92198>: Abbrev Number: 1 (DW_TAG_compile_unit)
    <92199>   DW_AT_stmt_list   : 0x7e43
    <9219d>   DW_AT_ranges      : 0x12e3
    <921a1>   DW_AT_name        : (indirect string, offset: 0x187b4): /root/git/linux/arch/x86/entry/entry_64.S
    <921a5>   DW_AT_comp_dir    : (indirect string, offset: 0x2a): /root/git/build/v6.0.0+binutils-latest
    <921a9>   DW_AT_producer    : (indirect string, offset: 0x51): GNU AS 2.38
    <921ad>   DW_AT_language    : 32769 (MIPS assembler)
  Compilation Unit @ offset 0x921af:
   Length:        0x1e93 (32-bit)
   Version:       5
   Unit Type:     DW_UT_compile (1)
   Abbrev Offset: 0x557b
   Pointer Size:  8
 <0><921bb>: Abbrev Number: 13 (DW_TAG_compile_unit)
    <921bc>   DW_AT_producer    : (indirect string, offset: 0x6622): GNU C11 12.1.1 20220629 [revision 7811663964aa7e31c3939b859bbfa2e16919639f] -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -mindirect-branch=thunk-extern -mindirect-branch-register -mindirect-branch-cs-prefix -mfunction-return=thunk-extern -mharden-sls=all -mrecord-mcount -mfentry -march=x86-64 -g -O2 -std=gnu11 -p -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -fcf-protection=none -falign-jumps=1 -falign-loops=1 -fno-asynchronous-unwind-tables -fno-jump-tables -fno-delete-null-pointer-checks -fno-allow-store-data-races -fstack-protector-strong -fno-stack-clash-protection -fzero-call-used-regs=used-gpr -fno-strict-overflow -fstack-check=no -fconserve-stack
    <921c0>   DW_AT_language    : 29    (C11)
    <921c1>   DW_AT_name        : (indirect line string, offset: 0x14b6): /root/git/linux/arch/x86/entry/syscall_64.c
    <921c5>   DW_AT_comp_dir    : (indirect line string, offset: 0): /root/git/build/v6.0.0+binutils-latest
    <921c9>   DW_AT_stmt_list   : 0x8110
 <1><921cd>: Abbrev Number: 6 (DW_TAG_base_type)
    <921ce>   DW_AT_byte_size   : 8
    <921cf>   DW_AT_encoding    : 7     (unsigned)
    <921d0>   DW_AT_name        : (indirect string, offset: 0x4dc4): long unsigned int


  reply	other threads:[~2022-10-05 15:43 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-03  8:56 Encountered error while encoding BTF due to Unsupported DW_TAG_unspecified_type(0x3b) Martin Liška
2022-10-03 12:07 ` Nick Clifton
2022-10-04 12:15   ` Arnaldo Carvalho de Melo
2022-10-04 12:17 ` Arnaldo Carvalho de Melo
2022-10-04 12:31   ` Arnaldo Carvalho de Melo
2022-10-04 21:42     ` Arnaldo Carvalho de Melo
2022-10-05  8:41     ` Martin Liška
2022-10-04 12:33   ` Nick Clifton
2022-10-04 13:25     ` Arnaldo Carvalho de Melo
2022-10-04 18:07       ` Arnaldo Carvalho de Melo
2022-10-04 21:13         ` Arnaldo Carvalho de Melo
2022-10-04 21:44 ` Arnaldo Carvalho de Melo
2022-10-05  7:23   ` Martin Liška
2022-10-05 14:37     ` Arnaldo Carvalho de Melo
2022-10-05 15:43       ` Arnaldo Carvalho de Melo [this message]
2022-10-06 11:54         ` Martin Liška
     [not found]           ` <Yz7bevBJAm0JiLfp@kernel.org>
2022-10-06 14:00             ` Arnaldo Carvalho de Melo
2022-10-06 14:15               ` [PATCH/RFC pahole] btf_encoder: Encode DW_TAG_unspecified_type as BTF_KIND_CONST was: " Arnaldo Carvalho de Melo
2022-10-06 16:04               ` Andrii Nakryiko
2022-10-06 17:23                 ` Arnaldo Carvalho de Melo
2022-10-07 20:21                   ` Arnaldo Carvalho de Melo
2022-10-08  0:25                     ` Yonghong Song
2022-10-10 12:06                       ` Arnaldo Carvalho de Melo
2022-10-10 20:08                         ` Arnaldo Carvalho de Melo
2022-10-10 20:19                           ` Arnaldo Carvalho de Melo
2022-10-11  5:57                             ` Yonghong Song
2022-10-11 13:45                               ` Arnaldo Carvalho de Melo
2022-10-11 15:33                                 ` Yonghong Song
2022-10-11 17:16                                   ` Arnaldo Carvalho de Melo
2023-01-30  9:23                                     ` Martin Liška
2023-01-30 14:20                                       ` pahole 1.25 plans was: " Arnaldo Carvalho de Melo
2023-03-12  0:03                                         ` Dominique Martinet
2022-10-05 16:55 ` Arnaldo Carvalho de Melo

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=Yz2mNfP2mmqAhkUn@kernel.org \
    --to=acme@kernel.org \
    --cc=dwarves@vger.kernel.org \
    --cc=mliska@suse.cz \
    --cc=nickc@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.