[PATCH] Add -l option to llvm-link and allow linking by resolving symbols

Duncan P. N. Exon Smith dexonsmith at apple.com
Sun Apr 27 16:31:48 PDT 2014


On 2014 Apr 25, at 11:48, Reid Kleckner <rnk at google.com> wrote:

> On Fri, Apr 25, 2014 at 11:31 AM, Mekhanoshin, Stanislav <Stanislav.Mekhanoshin at amd.com> wrote:
> That is correct. The assumption is that such static initializers of unreferenced symbols do not have side effects. If I remember correctly Borland smart linker had the same limitation. Also, if I remember correctly LTO with Sun Solaris was also limited by this.
> 
> I wish this was a reasonable assumption. However, we live in a dark world of great evil, where programs spawn threads from their dynamic initializers.

Or use static initializers to register functions to call at exit, like in
compiler-rt/lib/profile.



More information about the llvm-commits mailing list