[llvm-dev] __cxx_global_var_init rearranged by lld
Moshtaghi, Alireza via llvm-dev
llvm-dev at lists.llvm.org
Mon Jun 22 19:04:33 PDT 2020
Hi
I’m working on replacing our linker (ld 2.24) with lld however, seems like some of the template ctors are not placed in the same order by lld and we end up with some null pointers and I believe it has to do with the order of initializations of.
I used nm -n to compare the symbols in the output of ld vs lld and found that many symbols are placed differently…
When I grep the symbols to only see __cxx_global_var_init… I see that some are placed by lld differently than ld
Question:
The __cxx_global_var_initN symbols usually have a unique number (N) at the end but for my case there are few that do not have the unique number and some don’t even have any number (Just __cxx_global_var_init) because they are originated from different compilation units so I can’t use --symbol-ordering-file to tell lld to place them in the order I like. How can I force these symbols to have unique number so there is no confusion ?
Has anyone else had the same kind of problem before? And how did you fix it?
Thanks
A
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200623/24f179dd/attachment.html>
More information about the llvm-dev
mailing list