In Mac OS, How to list all functions used by executable from dynamic library?
Asked Answered
I

2

6

I tried to override network socket related function in Mail app. But I'm not sure if Mail app uses Core foundation socket or POSIX socket.

I use otool -l to find dynamic loaded library in LC_LOAD_DYLIB section. However, I want to know what exact functions it calls.

Interchange answered 10/11, 2013 at 14:21 Comment(0)
C
6

nm will show you the imported symbols. Use nm -ufm /Applications/Mail.app/Contents/MacOS/Mail to get symbols and the libraries/framework they came from.

Combustible answered 10/11, 2013 at 14:40 Comment(1)
The -f flag has a different meaning with llvm-nm (the current version of nm in macOS). So now the example should be nm -um /Applications/Mail.app/Contents/MacOS/MailIrving
H
0

Install binutils package in MacPorts, then use gobjdump?

Hardheaded answered 10/11, 2013 at 14:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.