stephenpeckham wrote: > What are the ABI implications here? Do all translation units have to agree on > whether a variable is "tocdata"? The manual change hints there's some sort of > linker fixup, but it's not clear to me how that works.
There are no ABI implications. Using -mtocdata removes a level of indirection, but you can mix tocdata and non-tocdata references to the same variable. The -mtocdata option is intended for variables that are part of the current loadable object and not imported. If you specify --mtocdata for a symbol that is actually imported, the linker will generate extra code (called "fixup" code) to reference the variable. A warning is printed because fixup code is not great for performance https://github.com/llvm/llvm-project/pull/67999 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits