[lld-macho][nfc] Rename some tests for consistency
authorJez Ng <jezng@fb.com>
Fri, 4 Mar 2022 19:20:49 +0000 (14:20 -0500)
committerJez Ng <jezng@fb.com>
Fri, 4 Mar 2022 19:21:16 +0000 (14:21 -0500)
Now all the tests that cover symbol resolution / precedence have
"resolution" in their filename.

I also added a couple of extra comments.

Reviewed By: #lld-macho, thakis

Differential Revision: https://reviews.llvm.org/D120938

lld/test/MachO/archive-symbol-resolution.s [moved from lld/test/MachO/symbol-order.s with 91% similarity]
lld/test/MachO/symbol-resolution.s [moved from lld/test/MachO/resolution.s with 100% similarity]

similarity index 91%
rename from lld/test/MachO/symbol-order.s
rename to lld/test/MachO/archive-symbol-resolution.s
index 0c90456..c41a09d 100644 (file)
@@ -10,6 +10,8 @@
 # RUN: llvm-ar rcs %t/libf2_g.a %t/f2.o %t/g.o
 # RUN: llvm-ar rcs %t/libfg.a %t/fg.o
 
+## (Strong) dylib symbols and archive symbols have equal precedence.
+
 # RUN: %lld %t/libf1.dylib %t/libf2_g.a %t/test.o -o %t/test.out -lSystem
 # RUN: llvm-objdump --syms --macho --lazy-bind %t/test.out | FileCheck %s --check-prefix DYLIB-FIRST
 # DYLIB-FIRST:      SYMBOL TABLE:
@@ -27,6 +29,8 @@
 # ARCHIVE-FIRST-NEXT: segment  section            address       dylib            symbol
 # ARCHIVE-FIRST-EMPTY:
 
+## Once an archive member is fetched, all the extern symbols in that member
+## take precedence over dylib symbols of the same name.
 # RUN: %lld %t/libf1.dylib %t/libfg.a %t/test.o -o %t/test.out -lSystem
 # RUN: llvm-objdump --syms --macho --lazy-bind %t/test.out | FileCheck %s --check-prefix ARCHIVE-PRIORITY
 # ARCHIVE-PRIORITY:      SYMBOL TABLE: