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

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 12 16:28:18 PST 2024


================
@@ -0,0 +1,16 @@
+# REQUIRES: x86
+# RUN: split-file %s %t
+# RUN: llvm-mc -filetype=obj -triple=x86_64 %t/a.s -o %t/a.o
+# RUN: llvm-mc -filetype=obj -triple=x86_64 %t/b.s -o %t/b.o
+# RUN: ld.lld %t/a.o %t/b.o -o /dev/null 2>&1 | FileCheck %s
+
+# CHECK: warning: incompatible SHF_X86_64_LARGE section flag for 'foo'
+# CHECK-NEXT: >>> {{.*}}a.o:(foo): 0x10000003
+# CHECK-NEXT: >>> {{.*}}b.o:(foo): 0x3
+
+#--- a.s
+.section foo,"awl", at progbits
+
+#--- b.s
+.section foo,"aw", at progbits
+
----------------
MaskRay wrote:

delete blank line

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


More information about the llvm-commits mailing list