[lld] [ELF] Orphan placement: remove hasInputSections condition (PR #93761)

Andrew Ng via llvm-commits llvm-commits at lists.llvm.org
Thu May 30 08:06:12 PDT 2024


================
@@ -20,14 +20,14 @@
 
 # CHECK: Section Headers
 # CHECK: .pad
+# CHECK-NEXT: .orphan1
 # CHECK-NEXT: .text
 # CHECK-NEXT: .orphan2
 # CHECK-NEXT: .ro
-# CHECK-NEXT: .orphan1
 
 # CHECK: Segment Sections
-# CHECK-NEXT: .pad .text .orphan2
-# CHECK-NEXT: .ro .orphan1
+# CHECK-NEXT: .pad .orphan1 .text .orphan2
+# CHECK-NEXT: .ro
----------------
nga888 wrote:

Only just read @igorkudrin's comment which basically explains why the above has changed. If a new `RankFlag` is preferable to retaining the use of `hasInputSections()` then +1 from me. The key thing from our point of view is that the behaviour in this test, `orphan-live-only.s` is maintained.

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


More information about the llvm-commits mailing list