diff options
| author | Midhunesh <midhunesh.p@ibm.com> | 2025-12-15 18:55:36 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-15 18:55:36 +0530 |
| commit | ee5b9cd59d161990be3436aaee94776ec5d455aa (patch) | |
| tree | 143ad2dd6dd2d90ee867f110209e17957dc0bdee /llvm/docs/CommandGuide | |
| parent | 6e01ea4babc8b5f41cc1541ab73af4388b1744f3 (diff) | |
| download | llvm-ee5b9cd59d161990be3436aaee94776ec5d455aa.tar.gz llvm-ee5b9cd59d161990be3436aaee94776ec5d455aa.tar.bz2 llvm-ee5b9cd59d161990be3436aaee94776ec5d455aa.zip | |
[llvm-symbolizer] Recognize and symbolize archive members (#150401)
This PR adds support for selecting specific archive members in
llvm-symbolizer using the `archive.a(member.o)` syntax, with
architecture-aware member selection.
**Key features:**
1. **Archive member selection syntax**: Specify archive members using
`archive.a(member.o)` format
2. **Architecture selection via `--default-arch` flag**: Select the
appropriate member when multiple members have the same name but
different architectures
3. **Architecture selection via `:arch` suffix**: Alternative syntax
`archive.a(member.o):arch` for specifying architecture
This functionality is primarily designed for AIX big archives, which can
contain multiple members with the same name but different architectures
(32-bit and 64-bit). However, the implementation works with all archive
formats (GNU, BSD, Darwin, big archive) and handles same-named members
created with llvm-ar q.
---------
Co-authored-by: Midhunesh <midhuensh.p@ibm.com>
Diffstat (limited to 'llvm/docs/CommandGuide')
| -rw-r--r-- | llvm/docs/CommandGuide/llvm-symbolizer.rst | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/llvm/docs/CommandGuide/llvm-symbolizer.rst b/llvm/docs/CommandGuide/llvm-symbolizer.rst index fb86a694f5d3..cb5127e9f4e1 100644 --- a/llvm/docs/CommandGuide/llvm-symbolizer.rst +++ b/llvm/docs/CommandGuide/llvm-symbolizer.rst @@ -535,16 +535,20 @@ MACH-O SPECIFIC OPTIONS .. option:: --default-arch <arch> If a binary contains object files for multiple architectures (e.g. it is a - Mach-O universal binary), symbolize the object file for a given architecture. - You can also specify the architecture by writing ``binary_name:arch_name`` in - the input (see example below). If the architecture is not specified in either - way, the address will not be symbolized. Defaults to empty string. + Mach-O universal binary or an archive with architecture variants), + symbolize the object file for a given architecture. You can also specify + the architecture by writing ``binary_name:arch_name`` in the input (see + example below). For archives, the format ``archive.a(member.o):arch`` + is also supported. If the architecture is not specified, + the address will not be symbolized. Defaults to empty string. .. code-block:: console $ cat addr.txt /tmp/mach_universal_binary:i386 0x1f84 /tmp/mach_universal_binary:x86_64 0x100000f24 + /tmp/archive.a(member.o):ppc 0x1000 + /tmp/archive.a(member.o):ppc64 0x2000 $ llvm-symbolizer < addr.txt _main @@ -553,6 +557,12 @@ MACH-O SPECIFIC OPTIONS _main /tmp/source_x86_64.cc:8 + _foo + /tmp/source_ppc.cc:12 + + _foo + /tmp/source_ppc64.cc:12 + .. option:: --dsym-hint <path/to/file.dSYM> If the debug info for a binary isn't present in the default location, look for |
