Re: [PATCH] Don't write COMDAT group id to LTO output on PE/COFF

2020-07-17 Thread Markus Böck via Gcc-patches
Sounds good to me! Don't think I'd be qualified or have the know how to make this change but the testsuite above should hopefully be of use. On Fri, Jul 17, 2020 at 3:59 PM Jan Hubicka wrote: > > > Yes that is correct. GCC simply checks if a symbol is part of a comdat > > group and if it is, emit

Re: [PATCH] Don't write COMDAT group id to LTO output on PE/COFF

2020-07-17 Thread Jan Hubicka
> Yes that is correct. GCC simply checks if a symbol is part of a comdat > group and if it is, emits .linkonce for it's section. GAS then sees > the directive and moves the symbol corresponding to the section name > to be the first symbol so it becomes the key. See: > https://github.com/bminor/binu

Re: [PATCH] Don't write COMDAT group id to LTO output on PE/COFF

2020-07-17 Thread Markus Böck via Gcc-patches
Yes that is correct. GCC simply checks if a symbol is part of a comdat group and if it is, emits .linkonce for it's section. GAS then sees the directive and moves the symbol corresponding to the section name to be the first symbol so it becomes the key. See: https://github.com/bminor/binutils-gdb/b

Re: [PATCH] Don't write COMDAT group id to LTO output on PE/COFF

2020-07-17 Thread Jan Hubicka
> The COFF linker errors with a multiple reference error before the > lto-wrapper process is started. If I understand correctly this is due > to how COMDAT works in PE/COFF as the associated string to the COMDAT > section is stored in the symbol table. When using the > --allow-multiple-definition f

Re: [PATCH] Don't write COMDAT group id to LTO output on PE/COFF

2020-07-17 Thread Markus Böck via Gcc-patches
The COFF linker errors with a multiple reference error before the lto-wrapper process is started. If I understand correctly this is due to how COMDAT works in PE/COFF as the associated string to the COMDAT section is stored in the symbol table. When using the --allow-multiple-definition flag as a w

Re: [PATCH] Don't write COMDAT group id to LTO output on PE/COFF

2020-07-17 Thread Richard Biener via Gcc-patches
On Thu, Jul 16, 2020 at 3:05 PM Markus Böck via Gcc-patches wrote: > > COFF targets currently do not support COMDAT groups. On MinGW targets > GCC instead puts symbols part of a COMDAT group inside of sections > annotated with the .linkonce GAS directive. This leads to GAS > generating a section s

[PATCH] Don't write COMDAT group id to LTO output on PE/COFF

2020-07-16 Thread Markus Böck via Gcc-patches
COFF targets currently do not support COMDAT groups. On MinGW targets GCC instead puts symbols part of a COMDAT group inside of sections annotated with the .linkonce GAS directive. This leads to GAS generating a section so that the COMDAT name is the same as the name of the actual symbol. When usi