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
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
-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
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,
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
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