[llvm] llvm-objdump: ensure a MachO symbol isn't STAB before looking up secion (PR #86667)
Adrian Prantl via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 28 15:53:05 PDT 2024
adrian-prantl wrote:
You can get STABS by compiling a program with debug info:
```
echo 'int main() { return 0; }'>/tmp/t.c
clang -g /tmp/t.c -o /tmp/t.o -c
xcrun ld /tmp/t.o -o /tmp/a.out
```
if we run a.out through obj2yaml
```
dsymutil -s /tmp/a.out | grep OSO
[ 3] 00000026 66 (N_OSO ) 00 0001 000000006605f353 '/private/tmp/t.o'
obj2yaml /tmp/a.out | grep '/private/tmp/t.o'
- '/private/tmp/t.o'
```
the STABS seem to survive the conversion to yaml, so we should be able to use it in a test case.
https://github.com/llvm/llvm-project/pull/86667
More information about the llvm-commits
mailing list