otool is command line tool of MacOS X that displays info of an object. The otool command displays specified parts of object files or libraries.
Questions tagged [otool]
136 questions
403
votes
40 answers
dyld: Library not loaded ... Reason: Image not found
When trying to run an executable I've been sent in Mac OS X, I get the following error
dyld: Library not loaded: libboost_atomic.dylib
Referenced from: /Users/"Directory my executable is in"
Reason: image not found
Trace/BPT trap:5
I have…

rwolst
- 12,904
- 16
- 54
- 75
104
votes
7 answers
Building OSX App Bundle
Suppose I have have made a an osX app without using Xcode. After compiling with GCC I get an executable which is linked to several other libraries. Some of those libraries might again be dynamically linked to other non-standard system libraries
Is…

Yogi
- 2,460
- 2
- 18
- 17
59
votes
2 answers
What is your favorite disassembler tool in Mac OS X?
I am using the otool, nm and Fraise text editor to disassemble the Mach-o binaries. My workflow at this point is pretty straightforward:
1. List the existed symbols.
nm -g
2. Get the disasm code.
otool -vt
3. Copy and paste this output to a…
user663896
40
votes
2 answers
Why is install_name_tool and otool necessary for Mach-O libraries in Mac Os X?
I am developing a Cocoa Application using the latest version of Xcode 4, I want to link dynamic libraries to my project (dylibs).
I read somewhere that adding the libraries in my project was not enough as I have to run install_name_tool and otool to…

Alex
- 2,247
- 1
- 27
- 37
28
votes
3 answers
MacOSX: which dynamic libraries linked by binary?
I have not been able to figure out why my binary is not loading. It is a dylib loaded by MATLAB (MEX-file), and links to quite a few dylibs in different locations. MATLAB tells me it cannot load the MEX-file, but I cannot figure out which of its…

Cris Luengo
- 55,762
- 10
- 62
- 120
26
votes
3 answers
how to use otool
apple suggested me to use "strings" or "otool" to dect the private api (isinf) in my code , I am totally newbie so any help how to use those tools

AMH
- 6,363
- 27
- 84
- 135
24
votes
2 answers
Determining OS X SDK and Deployment Target versions from Framework
Fairly straightforward question - if I have a .framework file, is there a command/tool that can be used to determine the SDK and Deployment Target versions used to create the framework?
Similarly, can this be performed on the application binary…

Craig Otis
- 31,257
- 32
- 136
- 234
24
votes
4 answers
Getting complete disassembly of an executable binary
Is it possible to get a complete disassembly (which can act as input to an assembler) of an executable?
When I use otool -tV a.out I get to see only the text section. Other sections like data aren't visible.
When I use gdb, the disassemble command…

mynk
- 1,194
- 2
- 13
- 16
22
votes
2 answers
What path does @loader_path resolve to?
I'm having a hard time understanding the absolute path that a @loader_path within a file refers to.
user@local:~$ otool -L zlib.so
zlib.so:
@loader_path/../../libz.1.dylib (compatibility version 1.0.0, current version 1.2.7)
…

ChrisB
- 4,628
- 7
- 29
- 41
17
votes
1 answer
‘ldd -r’ equivalent on macOS
I am trying to make my software available on macOS, and in my toolchain I use the ldd -r MyModel.so command to verify that everything went well, but I can’t really find an equivalent command on macOS with the same behavior.
otool and nm seem to be…

Gautier Bureau
- 183
- 1
- 1
- 9
15
votes
2 answers
How to detect if stack smashing protection is enabled in an iOS app
I want to be able to check if stack smashing protection (-fstack-protector-all) is enabled in an iOS app built on Xcode 9 with a target of iOS 11.
I built an app with -fstack-protector-all enabled in "Other C flags", and it does build and run, but…

craig65535
- 3,439
- 1
- 23
- 49
15
votes
2 answers
Matching up offsets in iOS crash dump to disassembled binary
I'm having trouble matching up the offsets in the stack traces of iOS crash dumps with offsets in the disassembly of the binary as output by otool.
Can anybody confirm how in principle I match these up. For example, if I get a line in the crash…

Neil Coffey
- 21,615
- 7
- 62
- 83
14
votes
3 answers
MacOSX: How to collect dependencies into a local bundle?
I am creating a plugin application (dylib) that depends on several other libraries. These other libraries are installed on my system, but are not guaranteed to be installed on any user's system. So I need to find a way bundle the dependencies along…

StackedCrooked
- 34,653
- 44
- 154
- 278
14
votes
1 answer
Is it possible to edit and recompile an iOS Binary?
I have an application and posted to Cydia recently. It has been cracked by someone else and posted it in torrent sites. I have a binary checksum verification mechanism inside and they were able to create a new checksum file based on the changes they…

IndoThaiGeek
- 161
- 1
- 4
12
votes
3 answers
install_name_tool difference between -change and -id
I have been struggling with this concept for a while and I cannot really understand what the difference is between -change and -id.The man page states
-id name
Changes the shared library identification name of a dynamic shared…

MistyD
- 16,373
- 40
- 138
- 240