[lld] [LLD] Implement --enable-non-contiguous-regions (PR #90007)

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Wed May 1 05:38:17 PDT 2024


================
@@ -0,0 +1,279 @@
+REQUIRES: x86
+
+RUN: split-file %s %t
+RUN: llvm-mc -n -filetype=obj -triple=x86_64 %t/spill.s -o %t/spill.o
+
+# An input section must spill to a later match if the region of its first match
+# would overflow.
+
+RUN: ld.lld -T %t/spill.ld %t/spill.o -o %t/spill --enable-non-contiguous-regions
+RUN: llvm-readelf -S %t/spill | FileCheck %s -check-prefix=SPILL
+
+SPILL:      Name          Type     Address          Off    Size
+SPILL:      .first_chance PROGBITS 0000000000000000 001000 000001
+SPILL-NEXT: .last_chance  PROGBITS 0000000000000002 001002 000002
+
+# A spill off the end must still fails the link.
----------------
smithp35 wrote:

Typo?
`must still fail the link.`

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


More information about the llvm-commits mailing list