[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 Jan 9 13:44:16 PST 2024
================
@@ -149,6 +149,15 @@ void OutputSection::commitSection(InputSection *isec) {
error("incompatible section flags for " + name + "\n>>> " +
toString(isec) + ": 0x" + utohexstr(isec->flags) +
"\n>>> output section " + name + ": 0x" + utohexstr(flags));
+ if (config->emachine == EM_X86_64) {
+ if ((flags ^ isec->flags) & SHF_X86_64_LARGE) {
+ InputSection *conflictISec = getFirstInputSection(this);
+ warn("incompatible SHF_X86_64_LARGE section flag for " + name +
----------------
MaskRay wrote:
Place `name` in single quotes
https://github.com/llvm/llvm-project/pull/72335
More information about the llvm-commits
mailing list