From: Jim Wilson <jimw@sifive.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: V3 [PATCH 0/2] Switch to a new section if the SECTION_RETAIN bit doesn't match
Date: Wed, 9 Dec 2020 18:08:37 -0800 [thread overview]
Message-ID: <CAFyWVaZVQUHnbEj8HSCe0QQMh3ButdPRLvZfLnWzGCDe7+LX3Q@mail.gmail.com> (raw)
In-Reply-To: <20201208125128.775313-1-hjl.tools@gmail.com>
On Tue, Dec 8, 2020 at 4:51 AM H.J. Lu via Gcc-patches <
gcc-patches@gcc.gnu.org> wrote:
> When SECTION_RETAIN is used, definitions marked with used attribute and
> unmarked definitions are placed in a section with the same name. Instead
> of issue an error:
>
Have you tested glibc builds with this patch? I noticed yesterday that
your earlier patch had broken glibc builds, and was about to raise a bug
report for that. I'm seeing
In file included from <command-line>:
gconv_db.c: In function 'free_mem':
gconv_db.c:831:18: error: 'free_mem' causes a section type conflict with
'free_derivation'
831 | libc_freeres_fn (free_mem)
| ^~~~~~~~
./../include/libc-symbols.h:316:15: note: in definition of macro
'libc_freeres_fn'
316 | static void name (void)
| ^~~~
gconv_db.c:174:1: note: 'free_derivation' was declared here
174 | free_derivation (void *p)
| ^~~~~~~~~~~~~~~
This is because free_derivation and free_mem are in the same section, but
free_mem has attribute used and free_derivation does not.
This patch is changing the error to a warning, which I think solves the
problem unless --enable-werror is used, which is probably good enough. We
could maybe decide that what glibc is doing is wrong and fix glibc to use
different section names or mark both functions as attribute used.
Jim
next prev parent reply other threads:[~2020-12-10 2:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-08 12:51 H.J. Lu
2020-12-08 12:51 ` V3 [PATCH 1/2] " H.J. Lu
2020-12-14 11:17 ` Vaseeharan Vinayagamoorthy
2020-12-15 1:06 ` Jeff Law
2020-12-15 2:07 ` H.J. Lu
2020-12-08 12:51 ` V3 [PATCH 2/2] Warn used and not used symbols in section with the same name H.J. Lu
2020-12-10 2:08 ` Jim Wilson [this message]
2020-12-10 2:14 ` V3 [PATCH 0/2] Switch to a new section if the SECTION_RETAIN bit doesn't match H.J. Lu
2020-12-10 3:12 ` Jim Wilson
2020-12-13 16:03 ` PING^1: " H.J. Lu
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=CAFyWVaZVQUHnbEj8HSCe0QQMh3ButdPRLvZfLnWzGCDe7+LX3Q@mail.gmail.com \
--to=jimw@sifive.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).