[llvm] [clang] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX (PR #67999)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 31 11:25:31 PDT 2023


https://github.com/efriedma-quic commented:

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.

Specifying the names of global variables on the command-line is a bit unusual; we normally prefer attributes.  Do you need that for XL compat?

The manual change says "the TOC data transformation will be applied to [...] block-scope static variables".   But later, you mention "internal linkage", which is a bit confusing when you're dealing with C++.  Block-scope static variables don't have "linkage" in the sense defined in the C++ standard.  Maybe worth trying to be more explicit here.

https://github.com/llvm/llvm-project/pull/67999


More information about the cfe-commits mailing list