[lld] [lld/ELF] Warn on conflicting SHF_X86_64_LARGE flag (PR #72335)

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 16 14:40:26 PST 2024


aeubanks wrote:

I discovered that in https://reviews.llvm.org/D20651 for PGO instrumentation value profiling, there are static buffers allocated per-TU, the size of which is based on a heuristic of how much value profiling there will be, plus a fixed amount for the entire binary added by that patch. these aren't directly referenced by code and is a case where we actually do want the flag union behavior. this is another case of "non-directly-referenced globals that are only small in some TUs but is harmless to make large", like if we have some asan_globals sections in precompiled small code model code mixed with medium/large code model TUs

https://github.com/llvm/llvm-project/pull/78348 should resolve most of the cases where there's actually an issue

I'll probably not submit this patch, but it is useful for seeing if there are any instrumentation sections we've explicitly marked large when we shouldn't have

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


More information about the llvm-commits mailing list