From: Fangrui Song <i@maskray.me>
To: Nick Clifton <nickc@redhat.com>
Cc: binutils@sourceware.org
Subject: Re: RFC: New gas directive: .attach_to_group
Date: Tue, 29 Sep 2020 09:53:17 -0700 [thread overview]
Message-ID: <20200929165317.2yebvny6gas4jz5f@gmail.com> (raw)
In-Reply-To: <87pn647h1h.fsf@redhat.com>
On 2020-09-29, Nick Clifton via Binutils wrote:
>Hi Guys,
>
> I am planning on applying the attached patch, but I wondered if anyone
> had any comments or thoughts first.
>
> The patch adds a new gas directive: ".attach_to_group <name>" which
> can be used to attach the current section to a named group. I need
> this functionality for the annobin plugin for gcc. The plugin creates
> new note sections and it wants to place them into section groups with
> their associated code section. (So the .annobin.text section is
> grouped with the .text section, the .annobin.text.hot section is
> grouped with the .text.hot section and so on). The problem is that
> the compiler creates the .section directives for (most of) these code
> sections, and it does not add a group section to their declaration.
> So I need a way to retroactively add a section to a group. Hence the
> new directive.
>
> Tested with a wide variety of different configurations and no
> problems.
>
> Thoughts ?
Hi Nick,
Is this directive an extension to the existing feature: ?
.section .text.foo,"axG",@progbits,group
.section .rodata.foo,"a?"
If the section group intention of .annobin.text is so that .annobin.text
can be discarded if the associated .text is discarded (--gc-sections),
an alternative is SHF_LINK_ORDER
HJ has done much work on this.
There are a few additions:
https://sourceware.org/pipermail/binutils/2020-August/112732.html
next prev parent reply other threads:[~2020-09-29 16:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-29 15:12 Nick Clifton
2020-09-29 16:53 ` Fangrui Song [this message]
2020-09-30 9:33 ` Nick Clifton
[not found] ` <3609c590-8750-a021-92fb-05ff0ba7ca7d@redhat.com>
2020-09-30 13:43 ` [PATCH] elf: Also check linked-to section for SHT_NOTE section H.J. Lu
2020-09-30 14:01 ` Nick Clifton
2020-09-30 14:03 ` H.J. Lu
2020-10-01 3:41 ` Fangrui Song
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=20200929165317.2yebvny6gas4jz5f@gmail.com \
--to=i@maskray.me \
--cc=binutils@sourceware.org \
--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 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).