From: Jeff Law <law@redhat.com>
To: "H.J. Lu" <hjl.tools@gmail.com>, gcc-patches@gcc.gnu.org
Subject: Re: V4 [PATCH 2/3] Warn used and not used symbols in section with the same name
Date: Tue, 15 Dec 2020 17:44:32 -0700 [thread overview]
Message-ID: <888f4c6c-eced-b882-6da9-678c0255f3f8@redhat.com> (raw)
In-Reply-To: <20201215173031.3242097-3-hjl.tools@gmail.com>
On 12/15/20 10:30 AM, H.J. Lu wrote:
> When SECTION_RETAIN is used, issue a warning when a symbol without used
> attribute and a symbol with used attribute are placed in the section with
> the same name, like
>
> int __attribute__((used,section(".data.foo"))) foo2 = 2;
> int __attribute__((section(".data.foo"))) foo1 = 1;
>
> since assembler will put them in different sections with the same section
> name.
>
> gcc/
>
> PR target/98146
> * varasm.c (switch_to_section): Warn when a symbol without used
> attribute and a symbol with used attribute are placed in the
> section with the same name.
>
> gcc/testsuite/
>
> PR target/98146
> * c-c++-common/attr-used-5.c: Updated.
> * c-c++-common/attr-used-6.c: Likewise.
> * c-c++-common/attr-used-7.c: Likewise.
> * c-c++-common/attr-used-8.c: Likewise.
OK
jeff
next prev parent reply other threads:[~2020-12-16 0:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-15 17:30 V4 [PATCH 0/3] Switch to a new section if the SECTION_RETAIN bit doesn't match H.J. Lu
2020-12-15 17:30 ` V4 [PATCH 1/3] " H.J. Lu
2020-12-16 0:44 ` Jeff Law
2020-12-16 13:01 ` H.J. Lu
2020-12-15 17:30 ` V4 [PATCH 2/3] Warn used and not used symbols in section with the same name H.J. Lu
2020-12-16 0:44 ` Jeff Law [this message]
2020-12-15 17:30 ` V4 [PATCH 3/3] Require .init_array/.fini_array support for SHF_GNU_RETAIN H.J. Lu
2020-12-16 0:45 ` Jeff Law
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=888f4c6c-eced-b882-6da9-678c0255f3f8@redhat.com \
--to=law@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hjl.tools@gmail.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).