[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:45:15 PST 2024


================
@@ -0,0 +1,25 @@
+# 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
+
+.type   hello, @object
----------------
MaskRay wrote:

The symbols hello and hello2 are unrelated and should be removed.

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


More information about the llvm-commits mailing list