public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/99889] New: Add powerpc ELFv1 support for -fpatchable-function-entry* with "o" sections
@ 2021-04-03  8:15 jakub at gcc dot gnu.org
  2021-04-03  8:16 ` [Bug target/99889] " jakub at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-03  8:15 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99889
           Summary: Add powerpc ELFv1 support for
                    -fpatchable-function-entry* with "o" sections
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
                CC: amodra at gmail dot com, hjl.tools at gmail dot com,
                    jakub at gcc dot gnu.org, marxin at gcc dot gnu.org,
                    seurer at gcc dot gnu.org, unassigned at gcc dot gnu.org
        Depends on: 98125, 99888
  Target Milestone: ---
              Host: powerpc64*-linux-gnu
            Target: powerpc64*-linux-gnu
             Build: powerpc64*-linux-gnu

+++ This bug was initially created as a clone of Bug #99888 +++

+++ This bug was initially created as a clone of Bug #98125 +++

As mentioned in PR98125, for 64-bit ELFv1 GCC 11 has a workaround where
compiler pretends linker doesn't support "o" section flag.
It would be good to find out how it can be supported in presence of .opd
section symbols, and either fix it on the assembler/linker side, or on the
compiler side or both.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98125
[Bug 98125] [11 Regression] New test case g++.dg/pr93195a.C in r11-5656 has
excess errors
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99888
[Bug 99888] Add powerpc ELFv2 support for -fpatchable-function-entry*

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/99889] Add powerpc ELFv1 support for -fpatchable-function-entry* with "o" sections
  2021-04-03  8:15 [Bug target/99889] New: Add powerpc ELFv1 support for -fpatchable-function-entry* with "o" sections jakub at gcc dot gnu.org
@ 2021-04-03  8:16 ` jakub at gcc dot gnu.org
  2022-08-12  7:57 ` linkw at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-03  8:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99889
Bug 99889 depends on bug 98125, which changed state.

Bug 98125 Summary: [11 Regression] New test case g++.dg/pr93195a.C in r11-5656 has excess errors
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98125

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/99889] Add powerpc ELFv1 support for -fpatchable-function-entry* with "o" sections
  2021-04-03  8:15 [Bug target/99889] New: Add powerpc ELFv1 support for -fpatchable-function-entry* with "o" sections jakub at gcc dot gnu.org
  2021-04-03  8:16 ` [Bug target/99889] " jakub at gcc dot gnu.org
@ 2022-08-12  7:57 ` linkw at gcc dot gnu.org
  2022-09-30 12:35 ` linkw at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: linkw at gcc dot gnu.org @ 2022-08-12  7:57 UTC (permalink / raw)
  To: gcc-bugs

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

Kewen Lin <linkw at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |linkw at gcc dot gnu.org
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-08-12
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Kewen Lin <linkw at gcc dot gnu.org> ---
I think PR105169 already fixed the original issue in PR98125, although the
referenced symbol is still _Z3foov, like:

  __patchable_function_entries,"awGo",@progbits,_Z3foov,_Z3foov,comdat  //
reverted the workaround as well.

the linking works well without any errors.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/99889] Add powerpc ELFv1 support for -fpatchable-function-entry* with "o" sections
  2021-04-03  8:15 [Bug target/99889] New: Add powerpc ELFv1 support for -fpatchable-function-entry* with "o" sections jakub at gcc dot gnu.org
  2021-04-03  8:16 ` [Bug target/99889] " jakub at gcc dot gnu.org
  2022-08-12  7:57 ` linkw at gcc dot gnu.org
@ 2022-09-30 12:35 ` linkw at gcc dot gnu.org
  2022-11-25  3:21 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: linkw at gcc dot gnu.org @ 2022-09-30 12:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99889
Bug 99889 depends on bug 99888, which changed state.

Bug 99888 Summary: Add powerpc ELFv2 support for -fpatchable-function-entry*
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99888

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/99889] Add powerpc ELFv1 support for -fpatchable-function-entry* with "o" sections
  2021-04-03  8:15 [Bug target/99889] New: Add powerpc ELFv1 support for -fpatchable-function-entry* with "o" sections jakub at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2022-09-30 12:35 ` linkw at gcc dot gnu.org
@ 2022-11-25  3:21 ` cvs-commit at gcc dot gnu.org
  2022-11-25  6:18 ` linkw at gcc dot gnu.org
  2023-07-21  5:49 ` linkw at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-11-25  3:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Kewen Lin <linkw@gcc.gnu.org>:

https://gcc.gnu.org/g:f120196382ac5ac49ec4a60f8abad42f22d45a91

commit r13-4294-gf120196382ac5ac49ec4a60f8abad42f22d45a91
Author: Kewen.Lin <linkw@gcc.gnu.org>
Date:   Thu Nov 24 21:17:28 2022 -0600

    Adjust the symbol for SECTION_LINK_ORDER linked_to section [PR99889]

    As discussed in PR98125, -fpatchable-function-entry with
    SECTION_LINK_ORDER support doesn't work well on powerpc64
    ELFv1 because the filled "Symbol" in

      .section name,"flags"o,@type,Symbol

    sits in .opd section instead of in the function_section
    like .text or named .text*.

    Since we already generates one label LPFE* which sits in
    function_section of current_function_decl, this patch is
    to reuse it as the symbol for the linked_to section.  It
    avoids the above ABI specific issue when using the symbol
    concluded from current_function_decl.

    Besides, with this support some previous workarounds can
    be reverted.

            PR target/99889

    gcc/ChangeLog:

            * config/rs6000/rs6000.cc (rs6000_print_patchable_function_entry):
            Adjust to call function default_print_patchable_function_entry.
            * targhooks.cc (default_print_patchable_function_entry_1): Remove
and
            move the flags preparation ...
            (default_print_patchable_function_entry): ... here, adjust to use
            current_function_funcdef_no for label no.
            * targhooks.h (default_print_patchable_function_entry_1): Remove.
            * varasm.cc (default_elf_asm_named_section): Adjust code for
            __patchable_function_entries section support with LPFE label.

    gcc/testsuite/ChangeLog:

            * g++.dg/pr93195a.C: Remove the skip on powerpc*-*-* 64-bit.
            * gcc.target/aarch64/pr92424-2.c: Adjust LPFE1 with LPFE0.
            * gcc.target/aarch64/pr92424-3.c: Likewise.
            * gcc.target/i386/pr93492-2.c: Likewise.
            * gcc.target/i386/pr93492-3.c: Likewise.
            * gcc.target/i386/pr93492-4.c: Likewise.
            * gcc.target/i386/pr93492-5.c: Likewise.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/99889] Add powerpc ELFv1 support for -fpatchable-function-entry* with "o" sections
  2021-04-03  8:15 [Bug target/99889] New: Add powerpc ELFv1 support for -fpatchable-function-entry* with "o" sections jakub at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2022-11-25  3:21 ` cvs-commit at gcc dot gnu.org
@ 2022-11-25  6:18 ` linkw at gcc dot gnu.org
  2023-07-21  5:49 ` linkw at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: linkw at gcc dot gnu.org @ 2022-11-25  6:18 UTC (permalink / raw)
  To: gcc-bugs

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

Kewen Lin <linkw at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #4 from Kewen Lin <linkw at gcc dot gnu.org> ---
Should be fixed on trunk.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/99889] Add powerpc ELFv1 support for -fpatchable-function-entry* with "o" sections
  2021-04-03  8:15 [Bug target/99889] New: Add powerpc ELFv1 support for -fpatchable-function-entry* with "o" sections jakub at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2022-11-25  6:18 ` linkw at gcc dot gnu.org
@ 2023-07-21  5:49 ` linkw at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: linkw at gcc dot gnu.org @ 2023-07-21  5:49 UTC (permalink / raw)
  To: gcc-bugs

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

Kewen Lin <linkw at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |i at maskray dot me

--- Comment #5 from Kewen Lin <linkw at gcc dot gnu.org> ---
*** Bug 110729 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-07-21  5:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-03  8:15 [Bug target/99889] New: Add powerpc ELFv1 support for -fpatchable-function-entry* with "o" sections jakub at gcc dot gnu.org
2021-04-03  8:16 ` [Bug target/99889] " jakub at gcc dot gnu.org
2022-08-12  7:57 ` linkw at gcc dot gnu.org
2022-09-30 12:35 ` linkw at gcc dot gnu.org
2022-11-25  3:21 ` cvs-commit at gcc dot gnu.org
2022-11-25  6:18 ` linkw at gcc dot gnu.org
2023-07-21  5:49 ` linkw at gcc dot gnu.org

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).