i-Pear opened a new pull request, #12964:
URL: https://github.com/apache/tvm/pull/12964

   Pointers to constructor functions will be placed in section ".ctors" or 
".init_array" in a binary file. However, the ".ctors" section is deprecated and 
Glibc is not going to call the constructor functions in it.
   If we use GNU linker ld to link objects (by default), it will convert 
".ctors" section to ".init_array" automatically, but not every linker has the 
compatibility. If we use lld (the LLVM linker) for better runtime performance 
(such as Link-Time-Optimization) and better compilation efficiency, the 
constructor functions will not be called, which will cause critical problems.
   Adding "UseInitArray" option to target_options_ will generate ".init_array" 
instead of ".ctors" at compile time, which will solve this problem. This is 
also Clang's default behavior.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to