xref: /llvm-project/llvm/docs/CommandGuide/llvm-otool.rst (revision 164266739298b39d3eac8d79ad12d1d654e2825e)
11a3f8865SNico Weberllvm-otool - Mach-O dumping tool
21a3f8865SNico Weber================================
31a3f8865SNico Weber
41a3f8865SNico Weber.. program:: llvm-otool
51a3f8865SNico Weber
61a3f8865SNico WeberSYNOPSIS
71a3f8865SNico Weber--------
81a3f8865SNico Weber
91a3f8865SNico Weber:program:`llvm-otool` [*option...*] *[file...]*
101a3f8865SNico Weber
111a3f8865SNico WeberDESCRIPTION
121a3f8865SNico Weber-----------
131a3f8865SNico Weber
141a3f8865SNico Weber:program:`llvm-otool` is a tool for dumping Mach-O files.
151a3f8865SNico Weber
161a3f8865SNico WeberIt attempts to be command-line-compatible and output-compatible with macOS's
171a3f8865SNico Weber:program:`otool`.
181a3f8865SNico Weber
191a3f8865SNico WeberOPTIONS
201a3f8865SNico Weber-------
211a3f8865SNico Weber
221a3f8865SNico Weber.. option:: -arch <value>
231a3f8865SNico Weber
241a3f8865SNico Weber Select slice of universal Mach-O file.
251a3f8865SNico Weber
26940e178cSNico Weber.. option:: -chained_fixups
27940e178cSNico Weber
28940e178cSNico Weber Print chained fixup information.
29940e178cSNico Weber
301a3f8865SNico Weber.. option:: -C
311a3f8865SNico Weber
321a3f8865SNico Weber Print linker optimization hints.
331a3f8865SNico Weber
34*16426673SNico Weber.. option:: -dyld_info
35*16426673SNico Weber
36*16426673SNico Weber  Print bind and rebase information.
37*16426673SNico Weber
381a3f8865SNico Weber.. option:: -D
391a3f8865SNico Weber
401a3f8865SNico Weber Print shared library id.
411a3f8865SNico Weber
421a3f8865SNico Weber.. option:: -d
431a3f8865SNico Weber
441a3f8865SNico Weber Print data section.
451a3f8865SNico Weber
461a3f8865SNico Weber.. option:: -f
471a3f8865SNico Weber
481a3f8865SNico Weber Print universal headers.
491a3f8865SNico Weber
501a3f8865SNico Weber.. option:: -G
511a3f8865SNico Weber
521a3f8865SNico Weber Print data-in-code table.
531a3f8865SNico Weber
541a3f8865SNico Weber.. option:: --help-hidden
551a3f8865SNico Weber
561a3f8865SNico Weber Print help for hidden flags.
571a3f8865SNico Weber
581a3f8865SNico Weber.. option:: --help
591a3f8865SNico Weber
601a3f8865SNico Weber Print help.
611a3f8865SNico Weber
621a3f8865SNico Weber.. option:: -h
631a3f8865SNico Weber
641a3f8865SNico Weber Print mach header.
651a3f8865SNico Weber
661a3f8865SNico Weber.. option:: -I
671a3f8865SNico Weber
681a3f8865SNico Weber Print indirect symbol table.
691a3f8865SNico Weber
701a3f8865SNico Weber.. option:: -j
711a3f8865SNico Weber
721a3f8865SNico Weber Print opcode bytes.
731a3f8865SNico Weber
741a3f8865SNico Weber.. option:: -L
751a3f8865SNico Weber
761a3f8865SNico Weber Print used shared libraries.
771a3f8865SNico Weber
781a3f8865SNico Weber.. option:: -l
791a3f8865SNico Weber
805294a0f7SKazu Hirata Print load commands.
811a3f8865SNico Weber
821a3f8865SNico Weber.. option:: -mcpu=<value>
831a3f8865SNico Weber
841a3f8865SNico Weber Select cpu for disassembly.
851a3f8865SNico Weber
861a3f8865SNico Weber.. option:: -o
871a3f8865SNico Weber
881a3f8865SNico Weber Print Objective-C segment.
891a3f8865SNico Weber
901a3f8865SNico Weber.. option:: -P
911a3f8865SNico Weber
921a3f8865SNico Weber Print __TEXT,__info_plist section as strings.
931a3f8865SNico Weber
941a3f8865SNico Weber.. option:: -p <function name>
951a3f8865SNico Weber
961a3f8865SNico Weber Start disassembly at <function name>.
971a3f8865SNico Weber
981a3f8865SNico Weber.. option:: -r
991a3f8865SNico Weber
1001a3f8865SNico Weber Print relocation entries.
1011a3f8865SNico Weber
1021a3f8865SNico Weber.. option:: -s <segname> <sectname>
1031a3f8865SNico Weber
1041a3f8865SNico Weber Print contents of section.
1051a3f8865SNico Weber
1061a3f8865SNico Weber.. option:: -t
1071a3f8865SNico Weber
1081a3f8865SNico Weber Print text section.
1091a3f8865SNico Weber
1101a3f8865SNico Weber.. option:: --version
1111a3f8865SNico Weber
1121a3f8865SNico Weber Print version.
1131a3f8865SNico Weber
1141a3f8865SNico Weber.. option:: -V
1151a3f8865SNico Weber
1161a3f8865SNico Weber Symbolize disassembled operands (implies :option:`-v`).
1171a3f8865SNico Weber
1181a3f8865SNico Weber.. option:: -v
1191a3f8865SNico Weber
1201a3f8865SNico Weber Verbose output / disassemble when printing text sections.
1211a3f8865SNico Weber
1221a3f8865SNico Weber.. option:: -X
1231a3f8865SNico Weber
1241a3f8865SNico Weber Omit leading addresses or headers.
1251a3f8865SNico Weber
1261a3f8865SNico Weber.. option:: -x
1271a3f8865SNico Weber
1281a3f8865SNico Weber Print all text sections.
1291a3f8865SNico Weber
1301a3f8865SNico Weber.. option:: @<FILE>
1311a3f8865SNico Weber
1321a3f8865SNico Weber Read command-line options and commands from response file `<FILE>`.
1331a3f8865SNico Weber
1341a3f8865SNico WeberEXIT STATUS
1351a3f8865SNico Weber-----------
1361a3f8865SNico Weber
1371a3f8865SNico Weber:program:`llvm-otool` exits with a non-zero exit code if there is an error.
1381a3f8865SNico WeberOtherwise, it exits with code 0.
1391a3f8865SNico Weber
1401a3f8865SNico WeberBUGS
1411a3f8865SNico Weber----
1421a3f8865SNico Weber
143bbce75e3SChuanqi XuTo report bugs, please visit <https://github.com/llvm/llvm-project/labels/tools:llvm-objdump/>.
1441a3f8865SNico Weber
1451a3f8865SNico WeberSEE ALSO
1461a3f8865SNico Weber--------
1471a3f8865SNico Weber
1481a3f8865SNico Weber:manpage:`llvm-nm(1)`, :manpage:`llvm-objdump(1)`
149