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

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 14 20:48:04 PST 2023


MaskRay wrote:

I understand your perspective, but the presence of a warning can be debated from both angles.

Issuing a warning allows us to capture certain compiler-side issues or user configuration problems within our control.

However, it is conventional to take the union of all input flags.
For example, merging a non-writable section with a writable section is supported, even in many cases undesired.
Therefore, the rationale behind this patch seems somewhat tenuous.

If a warning (an or error if `--fatal-warnings`) arises, and it's challenging to manage, should we incorporate
another option to suppress the warning/error?

If we add an option for this, then there is a question whether this is significant enough to justify a new option.
I'm undecided, considering the somewhat feeble basis.


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


More information about the llvm-commits mailing list