Leonid
Leonid

Reputation: 23460

Finding all callers of a function from the object file

What are the ways to find all callers (symbol names) of a particular function / symbol using only the compilation unit? How to find from a compilation unit which library included in that unit was a symbol defined in?

Upvotes: 2

Views: 390

Answers (1)

Oliver Charlesworth
Oliver Charlesworth

Reputation: 272487

If you're looking for calls to a function called func in an object file called obj.o, then:

objdump -dCS .text obj.o | grep func

Obviously, you can't find incoming calls this way.

Upvotes: 2

Related Questions