public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/113183] LTO crashes with Segmentation fault
Date: Sat, 30 Dec 2023 20:20:03 +0000 [thread overview]
Message-ID: <bug-113183-4-T18N7GKgwj@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113183-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113183
--- Comment #12 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Sebastian Unger from comment #11)
> I see. It was the SORT_BY_INIT_PRIORITY with the section name used not
> actually having a priority that triggered it, was it?! If I change the
> section name to .init_array.1 then it works.
>
> But, yes, you suggestion using the constructor attribute is even better.
>
> Thank you very much.
>
> I suspect it would still be better to not crash though. ;-)
Changing the linker script to:
```
.preinit_array : { KEEP(*(SORT_BY_INIT_PRIORITY(".preinit_array.*"))) KEEP
(*(.preinit_array)) } >"LOADER_REGION"
__preinit_array_start = ADDR(.preinit_array);
__preinit_array_end = ADDR(.preinit_array) + SIZEOF(.preinit_array);
.init_array : { KEEP(*(SORT_BY_INIT_PRIORITY(".init_array.*"))) KEEP
(*(.init_array)) } >"LOADER_REGION"
```
Also fixes the ICE if you don't want to change to use the constructor
attribute.
next prev parent reply other threads:[~2023-12-30 20:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-30 19:35 [Bug lto/113183] New: " sebunger44 at gmail dot com
2023-12-30 19:40 ` [Bug lto/113183] " pinskia at gcc dot gnu.org
2023-12-30 19:43 ` pinskia at gcc dot gnu.org
2023-12-30 19:44 ` pinskia at gcc dot gnu.org
2023-12-30 19:45 ` sebunger44 at gmail dot com
2023-12-30 19:46 ` pinskia at gcc dot gnu.org
2023-12-30 19:48 ` pinskia at gcc dot gnu.org
2023-12-30 19:48 ` sebunger44 at gmail dot com
2023-12-30 19:49 ` sebunger44 at gmail dot com
2023-12-30 19:49 ` sebunger44 at gmail dot com
2023-12-30 19:54 ` pinskia at gcc dot gnu.org
2023-12-30 20:00 ` sebunger44 at gmail dot com
2023-12-30 20:20 ` pinskia at gcc dot gnu.org [this message]
2023-12-30 20:25 ` sebunger44 at gmail dot com
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-113183-4-T18N7GKgwj@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).