[PATCH][PR94156] Split COMDAT groups on target that do not support them

2021-03-23 Thread Markus Böck via Gcc-patches
GCC at the moment uses COMDAT groups for things like virtual thunks, even on targets that do not support COMDAT groups. This has not been a problem as on platforms not supporting these (such as PE COFF on Windows), the backend handled it through directives to GAS. GCC would simply use a .linkonce d

[PATCH] [PR96608] analyzer: Change cast from long to intptr_t

2020-09-30 Thread Markus Böck via Gcc-patches
Casting to intptr_t states the intent of an integer to pointer cast more clearly and ensures that the cast causes no loss of precision on any platforms. LLP64 platforms eg. have a long value of 4 bytes and pointer values of 8 bytes which may even cause compiler errors. Fixes PR 96608 Would need t

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

2020-07-17 Thread Markus Böck via Gcc-patches
-definition flag as a workaround linkage succeeds. > > > > > > So the problem is caused by fact that we give linker different comdat > > > group names from LTO symtab then the ones from ltrans since in first > > > case we do ELF style comdat group that is keyed diff

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

2020-07-17 Thread Markus Böck via Gcc-patches
names from LTO symtab then the ones from ltrans since in first > case we do ELF style comdat group that is keyed differently than the > linkonce extension? > > Honza > > > > On Fri, Jul 17, 2020 at 9:31 AM Richard Biener > > wrote: > > > > > > On Thu,

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

2020-07-17 Thread Markus Böck via Gcc-patches
workaround linkage succeeds. On Fri, Jul 17, 2020 at 9:31 AM Richard Biener wrote: > > 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

[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