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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |crazylht at gmail dot com

--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Jakub Jelinek from comment #0)
> 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_BindIFPFvPvxxxEPN3vtk6detail3smp27vtkSMPToo
> ls_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_BindIFPFvPvxxxEPN3vtk6detail3smp27vtkSMPTool
> s_FunctorInternalIN12_GLOBAL__N_19CountUsesIxEELb0EEExxxEEE10_M_managerERSt9_
> Any_dataRKSH_St18_Manager_operation[_ZN26vtkStaticCellLinksTemplateIxE18Threa
> dedBuildLinksExxP12vtkCellArray]' of /tmp/ccEORVfz.o
> `_ZNSt17_Function_handlerIFvvESt5_BindIFPFvPvxxxEPN3vtk6detail3smp27vtkSMPToo
> ls_FunctorInternalIN12_GLOBAL__N_111InsertLinksIxEELb0EEExxxEEE10_M_managerER
> St9_Any_dataRKSH_St18_Manager_operation' referenced in section
> `.data.rel.ro.local' of /tmp/ccEORVfz.o: defined in discarded section
> `.text.
> _ZNSt17_Function_handlerIFvvESt5_BindIFPFvPvxxxEPN3vtk6detail3smp27vtkSMPTool
> s_FunctorInternalIN12_GLOBAL__N_111InsertLinksIxEELb0EEExxxEEE10_M_managerERS
> t9_Any_dataRKSH_St18_Manager_operation[_ZN26vtkStaticCellLinksTemplateIxE18Th
> readedBuildLinksExxP12vtkCellArray]' of /tmp/ccEORVfz.o
> 
> That change adds quite a few changes like:
> 
> -       leaq   
> _ZNSt17_Function_handlerIFvvESt5_BindIFPFvPvxxxEPN3vtk6detail3smp27vtkSMPTool
> s_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_BindIFPFvPvxxxEPN3vtk6detail3smp27vtkSMPTool
> s_FunctorInternalIN12_GLOBAL__N_19CountUsesIxEELb0EEExxxEEE9_M_invokeERKSt9_A
> ny_data(%rip), %rax
> -       movq    %rdx, %xmm3
> ...
> +       .section        .data.rel.ro.local,"aw"
> ...
> +.LC73:
> +       .quad  
> _ZNSt17_Function_handlerIFvvESt5_BindIFPFvPvxxxEPN3vtk6detail3smp27vtkSMPTool
> s_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.

LEA is changed to load through an indirection. Isn't it a regression?

Reply via email to