From 984197612ce9dcef9c48edccc7dd9b861077f1ae Mon Sep 17 00:00:00 2001 From: Jez Ng Date: Fri, 4 Mar 2022 14:20:49 -0500 Subject: [PATCH] [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 --- lld/test/MachO/{symbol-order.s => archive-symbol-resolution.s} | 4 ++++ lld/test/MachO/{resolution.s => symbol-resolution.s} | 0 2 files changed, 4 insertions(+) rename lld/test/MachO/{symbol-order.s => archive-symbol-resolution.s} (91%) rename lld/test/MachO/{resolution.s => symbol-resolution.s} (100%) 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 0c90456..c41a09d 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 -- 2.7.4