how to see contents of a.out file?
You can use nm
to see the internal symbols and objdump
to get the disassemble. By example:
objdump -D a.out | less
Note however that during the final linking of the object files into the executable a lot of symbols and internal data get eliminated, therefore you won't be able to understand the structure as you would be with object files.
If you want to edit and modify the executable, I suggest you to use the hte
editor, which can act as disassembler for x86 executables. If you are a debian/ubuntu user the package name is "ht" (not "hte").
Also I wrote a little elf disassembly library which is still incomplete but pretty funny. You can find other (more complete and probably better) implementations however!
Abhilash Muthuraj
Updated on June 27, 2022Comments
-
Abhilash Muthuraj almost 2 years
The executable file of c++ will contain linkers, modules and others, i would like to look into its contents, i'm using linux, how can i view contents of a.out? which command should use to browse a.out, text editors wont show the contents......