From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Alan Maguire <alan.maguire@oracle.com>
Cc: yhs@fb.com, ast@kernel.org, olsajiri@gmail.com,
eddyz87@gmail.com, sinquersw@gmail.com, timo@incline.eu,
daniel@iogearbox.net, andrii@kernel.org, songliubraving@fb.com,
john.fastabend@gmail.com, kpsingh@chromium.org, sdf@google.com,
haoluo@google.com, martin.lau@kernel.org, bpf@vger.kernel.org
Subject: Re: [PATCH v2 dwarves 1/5] dwarves: help dwarf loader spot functions with optimized-out parameters
Date: Mon, 30 Jan 2023 21:25:17 -0300 [thread overview]
Message-ID: <Y9hf7cgqt6BHt2dH@kernel.org> (raw)
In-Reply-To: <561b2e18-40b3-e04f-d72e-6007e91fd37c@oracle.com>
Em Mon, Jan 30, 2023 at 10:37:56PM +0000, Alan Maguire escreveu:
> On 30/01/2023 20:23, Arnaldo Carvalho de Melo wrote:
> > Em Mon, Jan 30, 2023 at 05:10:51PM -0300, Arnaldo Carvalho de Melo escreveu:
> >> +++ b/dwarves.h
> >> @@ -262,6 +262,7 @@ struct cu {
> >> uint8_t has_addr_info:1;
> >> uint8_t uses_global_strings:1;
> >> uint8_t little_endian:1;
> >> + uint8_t nr_register_params;
> >> uint16_t language;
> >> unsigned long nr_inline_expansions;
> >> size_t size_inline_expansions;
> >
> Thanks for this, never thought of cross-builds to be honest!
> Tested just now on x86_64 and aarch64 at my end, just ran
> into one small thing on one system; turns out EM_RISCV isn't
> defined if using a very old elf.h; below works around this
> (dwarves otherwise builds fine on this system).
Ok, will add it and will test with containers for older distros too.
- Arnaldo
> diff --git a/dwarf_loader.c b/dwarf_loader.c
> index dba2d37..47a3bc2 100644
> --- a/dwarf_loader.c
> +++ b/dwarf_loader.c
> @@ -992,6 +992,11 @@ static struct class_member *class_member__new(Dwarf_Die *die, struct cu *c
> return member;
> }
>
> +/* for older elf.h */
> +#ifndef EM_RISCV
> +#define EM_RISCV 243
> +#endif
> +
> /* How many function parameters are passed via registers? Used below in
> * determining if an argument has been optimized out or if it is simply
> * an argument > cu__nr_register_params(). Making cu__nr_register_params()
--
- Arnaldo
next prev parent reply other threads:[~2023-01-31 0:25 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-30 14:29 [PATCH v2 dwarves 0/5] dwarves: support encoding of optimized-out parameters, removal of inconsistent static functions Alan Maguire
2023-01-30 14:29 ` [PATCH v2 dwarves 1/5] dwarves: help dwarf loader spot functions with optimized-out parameters Alan Maguire
2023-01-30 18:36 ` Arnaldo Carvalho de Melo
2023-01-30 20:10 ` Arnaldo Carvalho de Melo
2023-01-30 20:23 ` Arnaldo Carvalho de Melo
2023-01-30 22:37 ` Alan Maguire
2023-01-31 0:25 ` Arnaldo Carvalho de Melo [this message]
2023-01-31 1:04 ` Arnaldo Carvalho de Melo
2023-01-31 12:14 ` Alan Maguire
2023-01-31 12:33 ` Arnaldo Carvalho de Melo
2023-01-31 13:35 ` Jiri Olsa
2023-01-31 17:43 ` Alexei Starovoitov
2023-01-31 18:16 ` Alexei Starovoitov
2023-01-31 23:45 ` Alan Maguire
2023-01-31 23:58 ` David Vernet
2023-02-01 0:14 ` Alexei Starovoitov
2023-02-01 3:02 ` David Vernet
2023-02-01 13:59 ` Alan Maguire
2023-02-01 15:02 ` Arnaldo Carvalho de Melo
2023-02-01 15:13 ` Alan Maguire
2023-02-01 15:19 ` David Vernet
2023-02-01 16:49 ` Alexei Starovoitov
2023-02-01 17:01 ` Arnaldo Carvalho de Melo
2023-02-01 17:18 ` Alan Maguire
2023-02-01 18:54 ` Arnaldo Carvalho de Melo
2023-02-01 22:33 ` Alan Maguire
2023-02-01 22:32 ` Arnaldo Carvalho de Melo
2023-02-02 1:09 ` Arnaldo Carvalho de Melo
2023-02-03 1:09 ` Yonghong Song
2023-01-30 14:29 ` [PATCH v2 dwarves 2/5] btf_encoder: refactor function addition into dedicated btf_encoder__add_func Alan Maguire
2023-02-01 17:19 ` Arnaldo Carvalho de Melo
2023-02-01 17:50 ` Alan Maguire
2023-02-01 18:59 ` Arnaldo Carvalho de Melo
2023-01-30 14:29 ` [PATCH v2 dwarves 3/5] btf_encoder: rework btf_encoders__*() API to allow traversal of encoders Alan Maguire
2023-01-30 22:04 ` Jiri Olsa
2023-01-31 0:24 ` Arnaldo Carvalho de Melo
2023-01-30 14:29 ` [PATCH v2 dwarves 4/5] btf_encoder: represent "."-suffixed functions (".isra.0") in BTF Alan Maguire
2023-01-30 14:29 ` [PATCH v2 dwarves 5/5] btf_encoder: delay function addition to check for function prototype inconsistencies Alan Maguire
2023-01-30 17:20 ` Alexei Starovoitov
2023-01-30 18:08 ` 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=Y9hf7cgqt6BHt2dH@kernel.org \
--to=acme@kernel.org \
--cc=alan.maguire@oracle.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=kpsingh@chromium.org \
--cc=martin.lau@kernel.org \
--cc=olsajiri@gmail.com \
--cc=sdf@google.com \
--cc=sinquersw@gmail.com \
--cc=songliubraving@fb.com \
--cc=timo@incline.eu \
--cc=yhs@fb.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.