[llvm] [llvm-symbolizer] Recognize AIX big archive (PR #150401)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 5 01:50:10 PST 2025
================
@@ -0,0 +1,33 @@
+// Test big archive recognition and error handling in llvm-symbolizer.
+
+// Generate object files.
+// RUN: yaml2obj -o %t-32.o %S/Inputs/big-archive-32.yaml
+// RUN: yaml2obj -o %t-64.o %S/Inputs/big-archive-64.yaml
+
+// Create archive with same-named members using different modes.
+// RUN: rm -f %t.a
+// RUN: cp %t-32.o %t.o
+// RUN: llvm-ar %if system-aix %{-X32%} crv %t.a %t.o
+// RUN: cp %t-64.o %t.o
+// RUN: llvm-ar %if system-aix %{-X64 rv%} %else %{qv%} %t.a %t.o
+
+// Verify archive contains two members with same name.
+// RUN: llvm-ar tv %if system-aix %{-X32_64%} %t.a | FileCheck %s --check-prefix=CHECK-ARCHIVE
+// CHECK-ARCHIVE: {{.*}}symbolize-big-archive-xcoff.test.tmp.o{{$}}
+// CHECK-ARCHIVE: {{.*}}symbolize-big-archive-xcoff.test.tmp.o{{$}}
+
+// Test successful symbolization.
+// RUN: llvm-symbolizer --default-arch=ppc --obj="%t.a(%{t:stem}.tmp.o)" 0x0 | FileCheck %s --check-prefix=CHECK-32
+// RUN: llvm-symbolizer --default-arch=ppc64 --obj="%t.a(%{t:stem}.tmp.o)" 0x0 | FileCheck %s --check-prefix=CHECK-64
+// RUN: llvm-symbolizer --obj="%t.a(%{t:stem}.tmp.o):ppc" 0x0 | FileCheck %s --check-prefix=CHECK-32
+// RUN: llvm-symbolizer --obj="%t.a(%{t:stem}.tmp.o):ppc64" 0x0 | FileCheck %s --check-prefix=CHECK-64
+// CHECK-32: foo
+// CHECK-64: foo
----------------
midhuncodes7 wrote:
corrected the check pattern
https://github.com/llvm/llvm-project/pull/150401
More information about the llvm-commits
mailing list