public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/113617] New: [14 Regression] Symbol ... referenced in section `.data.rel.ro.local' of ...: defined in discarded section ... since r14-4944
@ 2024-01-26 13:08 jakub at gcc dot gnu.org
  2024-01-26 13:08 ` [Bug rtl-optimization/113617] " jakub at gcc dot gnu.org
                   ` (28 more replies)
  0 siblings, 29 replies; 30+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-01-26 13:08 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113617
           Summary: [14 Regression] Symbol ... referenced in section
                    `.data.rel.ro.local' of ...: defined in discarded
                    section ... since r14-4944
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
  Target Milestone: ---

Since r14-4944-gf55cdce3f8dd8503e080e35be59c5f5390f6d95e the following testcase
can't be linked anymore.
for i in 1 2; do ./cc1plus -quiet -O2 -std=c++11 -fPIC -fvisibility=hidden
-fvisibility-inlines-hidden $i.ii; done; g++ -shared -o 1.so 1.s 2.s
`_ZNSt17_Function_handlerIFvvESt5_BindIFPFvPvxxxEPN3vtk6detail3smp27vtkSMPTools_FunctorInternalIN12_GLOBAL__N_19CountUsesIxEELb0EEExxxEEE10_M_managerERSt9_Any_dataRKSH_St18_Manager_operation'
referenced in section `.data.rel.ro.local' of /tmp/ccEORVfz.o: defined in
discarded section
`.text._ZNSt17_Function_handlerIFvvESt5_BindIFPFvPvxxxEPN3vtk6detail3smp27vtkSMPTools_FunctorInternalIN12_GLOBAL__N_19CountUsesIxEELb0EEExxxEEE10_M_managerERSt9_Any_dataRKSH_St18_Manager_operation[_ZN26vtkStaticCellLinksTemplateIxE18ThreadedBuildLinksExxP12vtkCellArray]'
of /tmp/ccEORVfz.o
`_ZNSt17_Function_handlerIFvvESt5_BindIFPFvPvxxxEPN3vtk6detail3smp27vtkSMPTools_FunctorInternalIN12_GLOBAL__N_111InsertLinksIxEELb0EEExxxEEE10_M_managerERSt9_Any_dataRKSH_St18_Manager_operation'
referenced in section `.data.rel.ro.local' of /tmp/ccEORVfz.o: defined in
discarded section
`.text._ZNSt17_Function_handlerIFvvESt5_BindIFPFvPvxxxEPN3vtk6detail3smp27vtkSMPTools_FunctorInternalIN12_GLOBAL__N_111InsertLinksIxEELb0EEExxxEEE10_M_managerERSt9_Any_dataRKSH_St18_Manager_operation[_ZN26vtkStaticCellLinksTemplateIxE18ThreadedBuildLinksExxP12vtkCellArray]'
of /tmp/ccEORVfz.o

That change adds quite a few changes like:

-       leaq   
_ZNSt17_Function_handlerIFvvESt5_BindIFPFvPvxxxEPN3vtk6detail3smp27vtkSMPTools_FunctorInternalIN12_GLOBAL__N_19CountUsesIxEELb0EEExxxEEE10_M_managerERSt9_Any_dataRKSH
_St18_Manager_operation(%rip), %rdx
+       movq    .LC73(%rip), %xmm3
        movq    $0, (%rsp)
        movq    %rax, 32(%rsp)
        leaq   
_ZNSt17_Function_handlerIFvvESt5_BindIFPFvPvxxxEPN3vtk6detail3smp27vtkSMPTools_FunctorInternalIN12_GLOBAL__N_19CountUsesIxEELb0EEExxxEEE9_M_invokeERKSt9_Any_data(%rip),
%rax
-       movq    %rdx, %xmm3
...
+       .section        .data.rel.ro.local,"aw"
...
+.LC73:
+       .quad  
_ZNSt17_Function_handlerIFvvESt5_BindIFPFvPvxxxEPN3vtk6detail3smp27vtkSMPTools_FunctorInternalIN12_GLOBAL__N_19CountUsesIxEELb0EEExxxEEE10_M_managerERSt9_Any_dataRKSH_St18_Manager_operation
but as the symbol is defined in a comdat section, that results in the linker
error.
Dunno if this was just latent before, or whether we need to force such
constants also into comdat sections in the same comdat group, etc.

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

end of thread, other threads:[~2024-03-08 14:20 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-26 13:08 [Bug rtl-optimization/113617] New: [14 Regression] Symbol ... referenced in section `.data.rel.ro.local' of ...: defined in discarded section ... since r14-4944 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
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

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