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

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 12 13:08:37 PST 2024


https://github.com/rnk approved this pull request.

One concern I have with this change is that it will create linker warnings for instrumentation tools (PGO & ASan) with mixed code models.

For ASan, asan_globals is large under large/medium models.
For PGO, __llvm_prof_names is large under large/medium models
There are no direct references to these sections, so taking the union of flags in the linker is safe, and the warning is safe to ignore in this case.

Would it be overkill to anticipate this? Should we special case some sections out of this, or should we plan to create a general mechanism to suppress this warning for particular sections?

Despite these concerns, I think we should land it as is.

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


More information about the llvm-commits mailing list