[lld] [llvm] IRSymTab: Record _GLOBAL_OFFSET_TABLE_ for ELF x86 (PR #89463)

via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 23 13:12:44 PDT 2024


pcc wrote:

> the difference is that for runtime library calls, adding all potentially created runtime calls to the bitcode symbol table is expensive.

More importantly, there would be no purpose in embedding the list in every object file. The bitcode symbol table is like a cache for the information in the rest of the bitcode file, and the behavior of the LLVM backend linked into lld is what ultimately matters for LTO because that's what generates library calls. Since the list is the same for every bitcode file, and it would go out of date if producer version != consumer version, the "cache" in the individual bitcode files would serve no purpose because `LTO::getRuntimeLibcallSymbols()` would always provide you with the correct symbol list.

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


More information about the llvm-commits mailing list