[llvm] [llvm-symbolizer] Recognize AIX big archive (PR #150401)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 12 00:58:04 PST 2025
================
@@ -0,0 +1,105 @@
+## Test big archive recognition with same-named members (XCOFF format).
+## Big archives can contain multiple members with the same name but different
+## architectures. This test verifies llvm-symbolizer can disambiguate using
+## architecture specification.
+
+# RUN: rm -rf %t.dir && mkdir %t.dir && cd %t.dir
+
+# RUN: yaml2obj --docnum=1 %s -o 32.o
+# RUN: yaml2obj --docnum=2 %s -o 64.o
+
+## Create big archive with same-named members using explicit format.
+# RUN: cp 32.o test.o
+# RUN: llvm-ar --format=bigarchive %if system-aix %{-X32%} crv archive.a test.o
+# RUN: cp 64.o test.o
+# RUN: llvm-ar --format=bigarchive %if system-aix %{-X64 rv%} %else %{qv%} archive.a test.o
+
+## Test symbolization disambiguates between 32-bit and 64-bit members
+## using architecture specified via --default-arch flag.
+# RUN: llvm-symbolizer --default-arch=ppc --obj="archive.a(test.o)" 0x0 | FileCheck %s --check-prefix=CHECK-32
+# RUN: llvm-symbolizer --default-arch=ppc64 --obj="archive.a(test.o)" 0x0 | FileCheck %s --check-prefix=CHECK-64
+
+## Test architecture specified via :arch suffix notation.
+# RUN: llvm-symbolizer --obj="archive.a(test.o):ppc" 0x0 | FileCheck %s --check-prefix=CHECK-32
+# RUN: llvm-symbolizer --obj="archive.a(test.o):ppc64" 0x0 | FileCheck %s --check-prefix=CHECK-64
+
+# CHECK-32: foo32
+# CHECK-64: foo64
+
+## Test error cases.
----------------
jh7370 wrote:
Please also add this test case for the big archive format:
> I'd also like to see what happens when there is no member with the specified architecture (but there is one with the right name).
https://github.com/llvm/llvm-project/pull/150401
More information about the llvm-commits
mailing list