http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53831



--- Comment #25 from Jan Hubicka <hubicka at gcc dot gnu.org> 2012-10-06 
14:50:27 UTC ---

What you hit here is the V1 linker plugin API hack.  We, for purpose, hide

COMDAT objects when we know we can hide them, because otherwise linker will

assign them PREVAILING and we will be forced to output them even if they are

otherwise unused.  This kills code quality and breaks some C++ apps.



Plugin API is underspecfied as what symbols you can create without being asked

for.  Obviously one need to create ones to get WHOPR work. I would agree with

comment #4 that linker should survive introduction of the COMDAT.



I am not sure if the testcase is invalid - it should include the definition of

the function IMO. But without giving up on V1 API we can not fix that.  I am

going to commit that to 4.8, so that will leave it 4.7 regression (or

non-regression) only.



We discussed it couple times - there is way to get this working with V2 linker

while still supporting hack for V1 API. It requires moving the whole logic into

plugin and I am not sure it is worth the effort for 4.7 alone.

Reply via email to