This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

WPA/LTRANS vs COMDAT vs linker plugin confusion.


    Hi all,

  From http://gcc.gnu.org/wiki/whopr/driver:

> When the WPA phase produces the definition of the COMDAT symbol in a new
> object file, that definition should not be in a COMDAT group.

  But it appears that it is:

> davek@gcc10:~/gcc/obj.patched/gcc/testsuite/g++$ grep section g++-dg-lto-200811
> 09-1-01.ltrans0.s
>         .section        .gcc_except_table,"a",@progbits
>         .section        .data.rel.ro._ZTI3Foo,"awG",@progbits,_ZTI3Foo,comdat
>         .section        .rodata._ZTS3Foo,"aG",@progbits,_ZTS3Foo,comdat
>         .section        .data.DW.ref._ZTI3Foo,"awG",@progbits,DW.ref._ZTI3Foo,co
> mdat
>         .section        .data.DW.ref.__gxx_personality_v0,"awG",@progbits,DW.ref
> .__gxx_personality_v0,comdat
>         .section        .note.GNU-stack,"",@progbits
> davek@gcc10:~/gcc/obj.patched/gcc/testsuite/g++$

  Note in particular _ZTI3Foo and _ZTS3Foo, they have comdat groupnames.  The
GAS manual doesn't even suggest a way to make a single comdat section without
a group for ELF.

  Am I misunderstanding what that line from the documentation means?  Does it
maybe just mean that WPA should pass it to LTRANS without specifying a comdat
group but LTRANS should go ahead and do so?

    cheers,
      DaveK


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]