From: Fangrui Song <i@maskray.me>
To: Alan Modra <amodra@gmail.com>
Cc: bd1976 llvm <bd1976llvm@gmail.com>, binutils@sourceware.org
Subject: Empty section flags
Date: Tue, 03 Mar 2020 21:20:00 -0000 [thread overview]
Message-ID: <BY5PR07MB7316A97E0E9709AD37A71E36CBE40@BY5PR07MB7316.namprd07.prod.outlook.com> (raw)
In-Reply-To: <20200210052104.GQ5669@bubble.grove.modra.org>
On Sun, Feb 9, 2020 at 9:21 PM Alan Modra <amodra@gmail.com> wrote:
>
> On Thu, Feb 06, 2020 at 05:25:33PM +0000, bd1976 llvm wrote:
> > Hi Alan, thanks for the input here. I wonder if it wouldn't be more
> > consistent to error in all cases - even in the case of different group
> > signatures. The only exception would need to be for the special section
> > names (.text, .debug_str, etc...) that the assembler has special knowledge
> > of (as you explained).
>
> Yes, let's see how that goes.
> https://sourceware.org/ml/binutils/2020-02/msg00129.html
>
> > I wonder why creating multiple sections with the
> > same name for section directives with different group signatures was
> > implemented - why not just require the use of a distinct section name for
> > these?
>
> I think plain ".text" for a group's text section is fine. Distict
> names would just be yet another thing to track for a group.
>
> > Or, now that GNU has the ",unique,N" assembly extension (
> > https://sourceware.org/ml/binutils/2020-02/msg00028.html) that could be
> > used if the section name is fixed - it would then be explicit in the source
> > code that another section with the same name will be created.
>
> Perhaps, but we aren't designing a new toolchain. Backwards
> compatibility can't be discarded without compelling reasons.
>
> --
> Alan Modra
> Australia Development Lab, IBM
For empty flags, should there be an error as well?
.section .foo,"ax",@progbits; .byte 1
.section .foo,"",@progbits; .byte 2 # no diagnostic
.section .foo,"a",@progbits; .byte 3 # Error: changed section
attributes for .foo
Context: https://github.com/ClangBuiltLinux/linux/issues/913
I lean toward an error for consistency, and I will try making the LLVM
MC side rule stick.
next prev parent reply other threads:[~2020-03-03 21:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-06 7:38 .section directives with the same name but different fields Fangrui Song
2020-02-06 8:33 ` Alan Modra
2020-02-06 9:19 ` Fangrui Song
2020-02-06 14:09 ` Alan Modra
2020-02-06 17:25 ` bd1976 llvm
2020-02-10 5:21 ` Alan Modra
2020-03-03 21:20 ` Fangrui Song [this message]
2020-04-04 14:17 ` Empty section flags H.J. Lu
2020-04-04 16:38 ` Fangrui Song
2020-04-04 16:45 ` H.J. Lu
2020-04-13 21:32 ` Fangrui Song
[not found] ` <CAN30aBGpQecmszv-JsZwVTNrOTW0dGt4zUjas7Cx6b-B3XwjgQ@mail.gmail.com>
2020-04-04 0:43 ` 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=BY5PR07MB7316A97E0E9709AD37A71E36CBE40@BY5PR07MB7316.namprd07.prod.outlook.com \
--to=i@maskray.me \
--cc=amodra@gmail.com \
--cc=bd1976llvm@gmail.com \
--cc=binutils@sourceware.org \
/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).