From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 66C7B3858C53; Fri, 26 Jan 2024 13:08:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 66C7B3858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706274508; bh=WydtF3eOCsaiNU38EC8vR6k7lvUgO9w1zJpwGWBgWiw=; h=From:To:Subject:Date:From; b=XJdisnaBuC2Aker5trrPV01QhrUYIZX6HgifV58KQ96Iy5guspIUzRy5KlshaXr7l OgF9GuSeBcshz2wt3bHlaR5ZoQnvGlzlr1O4gl4bbpNtaBtqaC8RfkF+jTh1VLVtKN uqBhUYs2GKR9LhEkKK+jiY5icvPh13LhUJbpFtZ4= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/113617] New: [14 Regression] Symbol ... referenced in section `.data.rel.ro.local' of ...: defined in discarded section ... since r14-4944 Date: Fri, 26 Jan 2024 13:08:27 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113617 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 test= case can't be linked anymore. for i in 1 2; do ./cc1plus -quiet -O2 -std=3Dc++11 -fPIC -fvisibility=3Dhid= den -fvisibility-inlines-hidden $i.ii; done; g++ -shared -o 1.so 1.s 2.s `_ZNSt17_Function_handlerIFvvESt5_BindIFPFvPvxxxEPN3vtk6detail3smp27vtkSMPT= ools_FunctorInternalIN12_GLOBAL__N_19CountUsesIxEELb0EEExxxEEE10_M_managerE= RSt9_Any_dataRKSH_St18_Manager_operation' referenced in section `.data.rel.ro.local' of /tmp/ccEORVfz.o: defined in discarded section `.text._ZNSt17_Function_handlerIFvvESt5_BindIFPFvPvxxxEPN3vtk6detail3smp27v= tkSMPTools_FunctorInternalIN12_GLOBAL__N_19CountUsesIxEELb0EEExxxEEE10_M_ma= nagerERSt9_Any_dataRKSH_St18_Manager_operation[_ZN26vtkStaticCellLinksTempl= ateIxE18ThreadedBuildLinksExxP12vtkCellArray]' of /tmp/ccEORVfz.o `_ZNSt17_Function_handlerIFvvESt5_BindIFPFvPvxxxEPN3vtk6detail3smp27vtkSMPT= ools_FunctorInternalIN12_GLOBAL__N_111InsertLinksIxEELb0EEExxxEEE10_M_manag= erERSt9_Any_dataRKSH_St18_Manager_operation' referenced in section `.data.rel.ro.local' of /tmp/ccEORVfz.o: defined in discarded section `.text._ZNSt17_Function_handlerIFvvESt5_BindIFPFvPvxxxEPN3vtk6detail3smp27v= tkSMPTools_FunctorInternalIN12_GLOBAL__N_111InsertLinksIxEELb0EEExxxEEE10_M= _managerERSt9_Any_dataRKSH_St18_Manager_operation[_ZN26vtkStaticCellLinksTe= mplateIxE18ThreadedBuildLinksExxP12vtkCellArray]' of /tmp/ccEORVfz.o That change adds quite a few changes like: - leaq=20=20=20 _ZNSt17_Function_handlerIFvvESt5_BindIFPFvPvxxxEPN3vtk6detail3smp27vtkSMPTo= ols_FunctorInternalIN12_GLOBAL__N_19CountUsesIxEELb0EEExxxEEE10_M_managerER= St9_Any_dataRKSH _St18_Manager_operation(%rip), %rdx + movq .LC73(%rip), %xmm3 movq $0, (%rsp) movq %rax, 32(%rsp) leaq=20=20=20 _ZNSt17_Function_handlerIFvvESt5_BindIFPFvPvxxxEPN3vtk6detail3smp27vtkSMPTo= ols_FunctorInternalIN12_GLOBAL__N_19CountUsesIxEELb0EEExxxEEE9_M_invokeERKS= t9_Any_data(%rip), %rax - movq %rdx, %xmm3 ... + .section .data.rel.ro.local,"aw" ... +.LC73: + .quad=20=20 _ZNSt17_Function_handlerIFvvESt5_BindIFPFvPvxxxEPN3vtk6detail3smp27vtkSMPTo= ols_FunctorInternalIN12_GLOBAL__N_19CountUsesIxEELb0EEExxxEEE10_M_managerER= St9_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.=