views:

228

answers:

2

Is there a way to find the object files from which the current executable is generated in Linux (RHEL to be specific). I understand that one can use "nm" to find the exported symbols, "ldd" to find dependent shared object.

But I could not find command to find out the name of object (.o) files of which executable is composed of. Is it possible?

+3  A: 

If it has been compiled with debugging infomation yes. Use gdb (man gdb) to find the infomation.

If it hasnt been compiled without debug infomation. You are out of luck.

nullptr
A: 

In addition to nullptr, "shared object" refers to other shared libraries (linked), not to original objects (not linked)

Marco van de Voort