public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@gmail.com>
To: Luis Machado <luis.machado@arm.com>
Cc: binutils@sourceware.org
Subject: Re: Support AArch64 MTE memory tag dumps in core files
Date: Fri, 1 Apr 2022 12:04:17 +1030	[thread overview]
Message-ID: <YkZWmZw4toZX29uO@squeak.grove.modra.org> (raw)
In-Reply-To: <20220331140457.9237-1-luis.machado@arm.com>

On Thu, Mar 31, 2022 at 03:04:57PM +0100, Luis Machado via Binutils wrote:
> diff --git a/bfd/section.c b/bfd/section.c
> index 9a1071454f5..e8c7caf9dd4 100644
> --- a/bfd/section.c
> +++ b/bfd/section.c
> @@ -412,6 +412,9 @@ CODE_FRAGMENT
>  .  {* Nonzero if this section uses RELA relocations, rather than REL.  *}
>  .  unsigned int use_rela_p:1;
>  .
> +.  {* Nonzero if this section contains memory tag data.  Default is 0.  *}
> +.  unsigned int has_memory_tags : 1;
> +.
>  .  {* Bits used by various backends.  The generic code doesn't touch
>  .     these fields.  *}
>  .
> @@ -455,6 +458,11 @@ CODE_FRAGMENT
>  .  {* The compressed size of the section in octets.  *}
>  .  bfd_size_type compressed_size;
>  .
> +.  {* If HAS_MEMORY_TAGS is true, MEMORY_TAGS_RANGE_SIZE is the original memory
> +.     range size, in octets, of the memory that contained the tags stored in this
> +.     section.  SIZE is the size of the packed tags from that memory range.  *}
> +.  bfd_size_type memory_tags_range_size;
> +.
>  .  {* Relaxation table. *}
>  .  struct relax_table *relax;
>  .

Really, you shouldn't be adding fields used by just one target to
struct bfd_section.  The linker might be dealing with hundreds of
thousands of sections.  If every target added fields because it was
convenient to do it that way, we'd end up with quite a non-trivial
memory cost for all targets.  Instead, you should look at adding the
new field to _aarch64_elf_section_data.

Yes, I know target specific fields have sneaked past review in the
past, eg. relax and relax_count are microblaze only.  I might even get
around to fixing those one day.

-- 
Alan Modra
Australia Development Lab, IBM

  reply	other threads:[~2022-04-01  1:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-31 14:04 Luis Machado
2022-04-01  1:34 ` Alan Modra [this message]
2022-04-01  8:21   ` Luis Machado
2022-04-03 12:04   ` Move microblaze relax info to target specific data Alan Modra
2022-04-21 15:18 ` [PATCH, v2] [AArch64] Support AArch64 MTE memory tag dumps in core files Luis Machado
2022-04-23  0:15   ` Alan Modra
2022-04-23 21:50     ` Fangrui Song
2022-05-03 11:23     ` Luis Machado
2022-05-03 11:33 ` [PATCH] " Luis Machado
2022-05-11 15:13   ` Luis Machado
2022-05-12  0:18     ` Alan Modra
2022-06-02  3:26       ` Fangrui Song
     [not found]       ` <DS7PR12MB57657DCC1DA5A6A4ABD7F813CBDE9@DS7PR12MB5765.namprd12.prod.outlook.com>
2022-06-06  7:05         ` Luis Machado
2022-07-19 14:27           ` Luis Machado

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=YkZWmZw4toZX29uO@squeak.grove.modra.org \
    --to=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=luis.machado@arm.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).