[lld] [lld][ELF] Handle archive special casing in Input Sections (PR #119293)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 3 21:22:18 PST 2025


================
@@ -72,6 +73,12 @@
 # RUN: ld.lld -o 11 -T 11.t --whole-archive 'lib1().a' dir2/lib2.a
 # RUN: llvm-objdump -s 11 | FileCheck --check-prefix=SECONDFIRST %s
 
+## Verify that matching files excluded from an archive doesn't match files within one
+# RUN: echo 'SECTIONS{.foo :{ KEEP(:*x.o(.foo)) KEEP(*y.o(.foo)) KEEP(*x.o(.foo)) }}' > 12.t
+# RUN: ld.lld -o 12 -T 12.t --whole-archive \
----------------
MaskRay wrote:

combined.a doesn't need to be wrapped

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


More information about the llvm-commits mailing list