Questions tagged [otool]

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.

136 questions
11
votes
1 answer

Dependencies on boost library don't have full path

I have my dynamic library built successfully with dependencies on boost libraries which were built and installed with custom prefix (./b2 install --prefix=PREFIX). However, when I run otool -L on my library I get output like…
peetonn
  • 2,942
  • 4
  • 32
  • 49
11
votes
4 answers

Using otool (recursively) to find shared libraries needed by an app

I have a Cocoa app that uses otool to find required shared libraries that an app needs to function properly. For example, say I run otool -L on an app that uses QTKit.framework. I get a list of the shared libraries used by the program (including the…
indragie
  • 18,002
  • 16
  • 95
  • 164
10
votes
2 answers

How to insert a LC_LOAD_DYLIB command into a Mach-O binary (OSX)

I'm looking to patch a piece of abandonware with some code. The software is carbon based, so I can not use an InputManager (at least, I do not think I can). My idea was to add a dylib reference to the mach-o header, and launch a new thread when the…
Moe
7
votes
1 answer

Disassemble default iOS apps with otool

When I try to disassemble the stock iOS apps (not app store ones) with otool it isn't split into different methods. It's just one massive section. Here's the command I'm using: otool -tV theApp.app/theApp >~/Desktop/output.txt Is there a way to get…
Johnathon
  • 123
  • 1
  • 1
  • 5
7
votes
0 answers

Reported dependency paths from otool are not the paths where the loader finds the dependencies

Hopefully this isn't a duplicate (I found a bunch of similar questions, but not exactly what I'm asking). On linux when I run ldd I get a nice list of the shared library dependencies and the path were those dependencies are…
Apo_
  • 141
  • 1
  • 7
7
votes
2 answers

"otool" and "file" can't show architecture of the ".a" file

I have builded some static libraries for ARM7 with cMake. Usually, when you use next command for .a file, it shows architectures: f.e. mac:libs User$ file ./libcurl.a ./libcurl.a: Mach-O universal binary with 3 architectures ./libcurl.a (for…
BergP
  • 3,453
  • 4
  • 33
  • 58
6
votes
1 answer

How to remove these mangled selectors from iOS app

I need help in removing known mangled selectors in my iOS app. Apple rejected my app stating: Regarding Guideline 2.3.1, this app is verified to contain mangled selectors such as - x7kQPFEZS4af59md1eVMqf42YSTGAZVO: and…
Ratan
  • 301
  • 2
  • 13
5
votes
2 answers

Recompilation with Bitcode changes LC_ID_DYLIB

I'm building a dynamic framework from source for iOS with bitcode enabled (using cmake and xcodebuild). I use lipo and install_name_tool to make a fat binary and update LC_ID_DYLIB, for binary to be loaded correctly. When I archive the application,…
Legoless
  • 10,942
  • 7
  • 48
  • 68
5
votes
1 answer

QMYSQL driver not loaded, tried all hints

iam writing an C++ application with QT 5.3 using QT-Creator as IDE on mac os 10.8. The problem appears when iam trying to load the QMYSQL plugin with db = QSqlDatabase::addDatabase("QMYSQL"); it results in QSqlDatabase: QMYSQL driver not…
user3761776
  • 209
  • 2
  • 9
5
votes
0 answers

install_name_tool -change fails silently and ignores -headerpad_max_install_names flag

I have a command-line executable that includes links to dylibs that — when distributed — will not be at the stated location returned by otool -L. For instance, given a binary called foo: $ otool -L foo /opt/local/lib/libgcc/libstdc++.6.dylib…
Alex Reynolds
  • 95,983
  • 54
  • 240
  • 345
5
votes
3 answers

How can I determine the location of disassembled code within an executable?

I've got an executable file (C++, i386, compiled under MacOS/X Tiger, if it matters) that contains a bug. The fix for the bug is straightforward -- there's a place in the code where it calls fork() and it shouldn't. Because the fix is simple, and…
Jeremy Friesner
  • 70,199
  • 15
  • 131
  • 234
4
votes
0 answers

dyld: Library not loaded: But Library seems entirely unrelated

I have an interesting issue: I have a C++ project (built with CMake/make) and probably some dependency I had compiled from source had their dependency updated via brew upgrade. Now, when I make, I get dyld: Library not loaded:…
oarfish
  • 4,116
  • 4
  • 37
  • 66
4
votes
1 answer

Strip/Remove debug symbols and archive names from a static library

I have a static library (C++) (say, libmylib_DARWIN.a and libmylib_LINUX.a for 2 architectures) compiled on my Mac using clang (Apple LLVM version 9.0.0 (clang-900.0.39.2) if is of any relevance). Right now, there are two problems: The static…
Anton Menshov
  • 2,266
  • 14
  • 34
  • 55
4
votes
1 answer

Qt Mac Application Failed to Create Self-contained App Bundle (Qt Creator Build)

I'm using Qt Creator 3.6.1 with Qt 5.6.0 (Clang 7.0 (Apple), 64 bit), and I encountered some problems while trying to create an app bundle for deployment. Note: the app name is called bibi Qt Creator successfully generated bibi.app under…
Heron Yang
  • 336
  • 2
  • 16
4
votes
1 answer

otool -L filename/path not working

I'm running through some various programming/debugging tutorials and uses the "otool" command in terminal. An example is to check for shared libraries. The error is always one of two. I'm running it from the directory the file is located. Typing in…
Amol Prakash
  • 247
  • 1
  • 3
  • 15
1
2
3
9 10