[lld] 9841976 - [lld-macho][nfc] Rename some tests for consistency
Jez Ng via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 4 11:23:24 PST 2022
Author: Jez Ng
Date: 2022-03-04T14:21:16-05:00
New Revision: 984197612ce9dcef9c48edccc7dd9b861077f1ae
URL: https://github.com/llvm/llvm-project/commit/984197612ce9dcef9c48edccc7dd9b861077f1ae
DIFF: https://github.com/llvm/llvm-project/commit/984197612ce9dcef9c48edccc7dd9b861077f1ae.diff
LOG: [lld-macho][nfc] Rename some tests for consistency
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
Added:
lld/test/MachO/archive-symbol-resolution.s
lld/test/MachO/symbol-resolution.s
Modified:
Removed:
lld/test/MachO/resolution.s
lld/test/MachO/symbol-order.s
################################################################################
diff --git a/lld/test/MachO/symbol-order.s b/lld/test/MachO/archive-symbol-resolution.s
similarity index 91%
rename from lld/test/MachO/symbol-order.s
rename to lld/test/MachO/archive-symbol-resolution.s
index 0c904560e5244..c41a09d8951dd 100644
--- a/lld/test/MachO/symbol-order.s
+++ b/lld/test/MachO/archive-symbol-resolution.s
@@ -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:
diff --git a/lld/test/MachO/resolution.s b/lld/test/MachO/symbol-resolution.s
similarity index 100%
rename from lld/test/MachO/resolution.s
rename to lld/test/MachO/symbol-resolution.s
More information about the llvm-commits
mailing list