[LLVMdev] Global constructors "get lost" when transforming bitcode files

Eric Christopher echristo at gmail.com
Fri Jul 4 11:23:01 PDT 2014


On Fri, Jul 4, 2014 at 10:55 AM, Jonas Wagner <jonas.wagner at epfl.ch> wrote:
> Hello,
>
> I've narrowed the issue down to revision 209015: Add comdat key field to
> llvm.global_ctors and llvm.global_dtors.
>
> This revision introduces an additional field to global constructors which,
> when non-null, can prevent constructors from being called. In my case, this
> field is always set to null, yet global constructors are not called.
>
> I've observed that this happens only on Mac, not on Linux. In the patch, I
> haven't found anything OS-specific. However, the issue might be due to
> different linker implementations.
>
> Does anybody have additional insights into this? Should I file a bug report?
>

Probably a good idea.

Rafael and David were looking at this sort of thing when I checked last...

-eric



More information about the llvm-dev mailing list