public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/113617] [14 Regression] Symbol ... referenced in section `.data.rel.ro.local' of ...: defined in discarded section ... since r14-4944
Date: Mon, 26 Feb 2024 17:06:08 +0000	[thread overview]
Message-ID: <bug-113617-4-VwSU2A3BEB@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113617-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #17 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:1931c40364bb9fb0a7c4b650917e3ac0e88bf6f4

commit r14-9185-g1931c40364bb9fb0a7c4b650917e3ac0e88bf6f4
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Mon Feb 26 17:55:07 2024 +0100

    varasm: Handle private COMDAT function symbol reference in readonly data
section [PR113617]

    If default_elf_select_rtx_section is called to put a reference to some
    local symbol defined in a comdat section into memory, which happens more
often
    since the r14-4944 RA change, linking might fail.
    default_elf_select_rtx_section puts such constants into .data.rel.ro.local
    etc. sections and if linker chooses comdat sections from some other TU
    and discards the one to which a relocation in .data.rel.ro.local remains,
    linker diagnoses error.  References to private comdat symbols can only
appear
    from functions or data objects in the same comdat group, so the following
    patch arranges using .data.rel.ro.local.pool.<comdat_name> and similar
sections.

    2024-02-26  Jakub Jelinek  <jakub@redhat.com>
                H.J. Lu  <hjl.tools@gmail.com>

            PR rtl-optimization/113617
            * varasm.cc (default_elf_select_rtx_section): For
            references to private symbols in comdat sections
            use .data.relro.local.pool.<comdat>, .data.relro.pool.<comdat>
            or .rodata.<comdat> comdat sections.

            * g++.dg/other/pr113617.C: New test.
            * g++.dg/other/pr113617.h: New test.
            * g++.dg/other/pr113617-aux.cc: New test.

  parent reply	other threads:[~2024-02-26 17:06 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-26 13:08 [Bug rtl-optimization/113617] New: " jakub at gcc dot gnu.org
2024-01-26 13:08 ` [Bug rtl-optimization/113617] " jakub at gcc dot gnu.org
2024-01-26 13:09 ` jakub at gcc dot gnu.org
2024-01-26 13:09 ` jakub at gcc dot gnu.org
2024-01-26 13:10 ` jakub at gcc dot gnu.org
2024-01-26 14:22 ` hjl.tools at gmail dot com
2024-01-26 14:28 ` jakub at gcc dot gnu.org
2024-01-26 14:39 ` hjl.tools at gmail dot com
2024-01-26 15:52 ` jakub at gcc dot gnu.org
2024-01-26 15:52 ` jakub at gcc dot gnu.org
2024-01-26 15:52 ` jakub at gcc dot gnu.org
2024-01-26 15:55 ` sjames at gcc dot gnu.org
2024-01-26 16:13 ` jakub at gcc dot gnu.org
2024-01-26 20:44 ` hjl.tools at gmail dot com
2024-01-27  5:53 ` hjl.tools at gmail dot com
2024-01-27 15:13 ` hjl.tools at gmail dot com
2024-01-30 12:45 ` jakub at gcc dot gnu.org
2024-02-14  3:20 ` orion at nwra dot com
2024-02-14  8:20 ` jakub at gcc dot gnu.org
2024-02-26 17:06 ` cvs-commit at gcc dot gnu.org [this message]
2024-02-26 17:25 ` jakub at gcc dot gnu.org
2024-03-07 13:31 ` fxcoudert at gcc dot gnu.org
2024-03-07 14:03 ` jakub at gcc dot gnu.org
2024-03-07 14:07 ` fxcoudert at gcc dot gnu.org
2024-03-07 14:08 ` jakub at gcc dot gnu.org
2024-03-07 14:11 ` fxcoudert at gcc dot gnu.org
2024-03-07 14:13 ` jakub at gcc dot gnu.org
2024-03-07 14:20 ` fxcoudert at gcc dot gnu.org
2024-03-07 14:23 ` fxcoudert at gcc dot gnu.org
2024-03-08 14:19 ` cvs-commit 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-113617-4-VwSU2A3BEB@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).