I'm a beginner in programming, I wonder what is inside the .o files and want to see it, but can't open the files in windows because they give some output with unrecognized symbols. Please suggest something !
Asked
Active
Viewed 2,149 times
1 Answers
6
They are object files, produced by the compiler, which the linker will combine into an executable.
They are not intended to be human readable.

Mawg says reinstate Monica
- 38,334
- 103
- 306
- 551
-
2Depending on the compiler system you are using, there might be tools that can show you some of the information in an object file in a human readable form. For GCC it is `objdump`, for example. – the busybee Aug 08 '19 at 07:24
-
can't we open them anyway, just to see what's inside of those .o files – hackeroid Aug 16 '19 at 10:24
-
Yes, you can, but you are unlikely to understand the contents. Give it a try – Mawg says reinstate Monica Aug 16 '19 at 11:41
-
I did open it and saw some unreadable format using certain special characters etc, but why is it that we can't read the code moreover if this is the code that our cpu understands then why isn't it in 0s and 1s because that's what our computers understand – hackeroid Aug 17 '19 at 06:40
-
It ***is*** in ones and zeros. Try looking in a [hex editor](https://mh-nexus.de/en/hxd/), although ever then you will only byte by byte, rather than bit by bit.. But your CPU doesn't look at it bit by bit either, probably in chunks of 64 bits. – Mawg says reinstate Monica Aug 18 '19 at 08:31