How to list all symbolic names for references to global varibables and functions with objdump (for MIPS arch)?

Nick Clifton nickc@redhat.com
Tue Dec 2 09:09:00 GMT 2008


Hi Pan,

>   703054:	8c42a064 	lw	v0,-24476(v0) <-- It is a reference to the
> global variable is_video in fact,
> 
>     but objdump doesn't show these messages
 >
> So, can I make objdump show all reference messages for functions and
> global variables?

Brian mentioned displaying relocs alongside the disassembly, which will 
help you with object files, but I suspect will not provide you with all 
of the information you are hoping to see.

In essence though the answer is "no", because it is just too difficult 
to recognise all references to global variables or functions.  A global 
variable might be accessed directly or via a base address plus an 
offset, or loaded into one register and then copied into another 
register, or aliased via a union or type punning.  Functions can have 
multiple entry points, or can be overlayed or even dynamically 
constructed at run-time.

Cheers
   Nick






More information about the Binutils mailing list