public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jozefl at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/98210] [11 Regression] SHF_GNU_RETAIN breaks gold linker generated binaries
Date: Fri, 19 Feb 2021 12:40:19 +0000	[thread overview]
Message-ID: <bug-98210-4-yBix9AFMMa@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-98210-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98210

--- Comment #9 from Jozef Lawrynowicz <jozefl at gcc dot gnu.org> ---
I believe this PR only relates to the fact that GCC support for SHF_GNU_RETAIN
was available before GOLD supported that section flag.

My proposed patch was to turn off GCC support for SHF_GNU_RETAIN if an
unsupported GOLD is detected.

I think at this point, the GOLD functionality was only broken for such a narrow
period of time in development (not corresponding to a concrete version of
Binutils), there's no point adding a configure test to try and catch that now.

(In reply to Jakub Jelinek from comment #8)
> Isn't this problem gone with
> r11-7284-g6347f4a0904fce17eedf5c071be6f3c118680290 ?
> I mean, attribute used now means what it used to mean before, and retain
> attribute is not used in whatever is emitted into .init_array section at
> least in existing code.  Yes, one might use it in user code, but the answer
> can be don't do it then.

And yes, since none of the libraries using the "used" attribute will implicitly
create SHF_GNU_RETAIN sections any more, even if you used the Binutils version
with broken GOLD, it won't cause any problems.

  parent reply	other threads:[~2021-02-19 12:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-09  7:46 [Bug target/98210] New: " amodra at gmail dot com
2020-12-09  9:06 ` [Bug target/98210] [11 Regression] " rguenth at gcc dot gnu.org
2020-12-09 13:12 ` hjl.tools at gmail dot com
2020-12-09 22:53 ` amodra at gmail dot com
2020-12-09 23:00 ` hjl.tools at gmail dot com
2020-12-15 15:23 ` jozefl at gcc dot gnu.org
2020-12-15 15:34 ` hjl.tools at gmail dot com
2020-12-16 18:41 ` jozefl at gcc dot gnu.org
2021-01-14 11:04 ` rguenth at gcc dot gnu.org
2021-01-29 21:53 ` segher at gcc dot gnu.org
2021-02-19 11:21 ` jakub at gcc dot gnu.org
2021-02-19 12:40 ` jozefl at gcc dot gnu.org [this message]
2021-02-19 17:20 ` jozefl at gcc dot gnu.org

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=bug-98210-4-yBix9AFMMa@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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).