r218287 - Don't use comdats for initializers on platforms that don't support it

Anton Korobeynikov anton at korobeynikov.info
Mon Sep 22 21:39:47 PDT 2014


Yeah, the only difference between .ctors and .init_array is the order
which the initializers are emitted in the section in.

On Tue, Sep 23, 2014 at 4:58 AM, Rafael Avila de Espindola
<rafael.espindola at gmail.com> wrote:
>
>
> Sent from my iPhone
>
> On Sep 22, 2014, at 20:55, Reid Kleckner <rnk at google.com> wrote:
>
> On Mon, Sep 22, 2014 at 5:32 PM, Rafael Avila de Espindola
> <rafael.espindola at gmail.com> wrote:
>>
>>
>> > URL: http://llvm.org/viewvc/llvm-project?rev=218287&view=rev
>> > Log:
>> > Don't use comdats for initializers on platforms that don't support it
>> >
>> > In particular, pre-.init_array ELF uses the .ctors section mechanism.
>> > MinGW COFF also uses .ctors, now that I think about it.
>>
>> Why doesn't it work with .ctors? It is just a list of pointers like
>> .init_array.
>
>
> I didn't think it was implemented. Are you saying it's possible and should
> be easy, or that it should already work? We're having issues with my
> favorite gold error, "relocation refers to discarded section".
>
>
> I though I had implemented comdat in both .ctors and .init_array in the same
> commit in LLVM.
>
> Would you mind reporting a bug with a testcase that used to fail? I will
> take a look as soon as I get back.
>
> Thanks,
> Rafael
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>



-- 
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University



More information about the cfe-commits mailing list