Files
clang-p2996/llvm/test/tools/llvm-objdump/MachO/sections.test
Nico Weber 1a3f88658a [llvm-objdump] Add an llvm-otool tool
This implements an LLVM tool that's flag- and output-compatible
with macOS's `otool` -- except for bugs, but from testing with both
`otool` and `xcrun otool-classic`, llvm-otool matches vanilla
otool's behavior very well already. It's not 100% perfect, but
it's a very solid start.

This uses the same approach as llvm-objcopy: llvm-objdump uses
a different OptTable when it's invoked as llvm-otool. This
is possible thanks to D100433.

Differential Revision: https://reviews.llvm.org/D100583
2021-04-20 08:24:58 -04:00

13 lines
507 B
Plaintext

# RUN: llvm-objdump --macho --section=__data %p/Inputs/bind2.macho-x86_64 | FileCheck %s
# RUN: llvm-otool -d %p/Inputs/bind2.macho-x86_64 | FileCheck %s
# CHECK: bind2.macho-x86_64:
# RUN: llvm-objdump --macho --section=__data %p/Inputs/section.macho-armv7 | FileCheck --check-prefix CHECK-ADDR %s
# CHECK-ADDR: 00000004 00000001 00000002
# RUN: llvm-objdump --macho --section=__const %p/Inputs/section.macho-armv7 | FileCheck --check-prefix CHECK-BYTES %s
# CHECK-BYTES: 0000000c 00000003 04 05 06