[lld] [lld][macho] Strip .__uniq. and .llvm. hashes in -order_file (PR #140670)

Ellis Hoag via llvm-commits llvm-commits at lists.llvm.org
Tue May 20 11:06:38 PDT 2025


================
@@ -0,0 +1,101 @@
+# RUN: rm -rf %t && split-file %s %t
+# RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %t/a.s -o %t/a.o
+
+# RUN: %lld -arch arm64 -lSystem -e _main -o %t/a.out %t/a.o -order_file %t/ord-1
+# RUN: llvm-nm --numeric-sort --format=just-symbols %t/a.out | FileCheck %s
+
+
+# .text
+# CHECK: A
+# CHECK: B
+# CHECK: C
+# .section __DATA,__objc_const
+# CHECK: _OBJC_$_CATEGORY_INSTANCE_METHODS_Foo_$_Cat1
+# CHECK: _ALPHABETIC_SORT_FIRST
----------------
ellishg wrote:

Some of these symbols are not found in the orderfile, so I don't think we should be checking their orders as it could change.

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


More information about the llvm-commits mailing list