I was compiling a program to find the maximum of numbers in an array.
Edited
I compiled it as follows:
gcc --save-temps max.c -o max
and then on doing
ls -l max*
the output was:
-rwxrwxr-x 1 tapan tapan 7296 Aug 16 01:45 max
-rw-rw-r-- 1 tapan tapan 233 Aug 16 01:45 max.c
-rw-rw-r-- 1 tapan tapan 17894 Aug 16 01:45 max.i
-rw-rw-r-- 1 tapan tapan 1308 Aug 16 01:45 max.o
-rw-rw-r-- 1 tapan tapan 1507 Aug 16 01:45 max.s
My question is: why is the size of .s assembly file larger than .o binary file?
I thought that .o file has binary strings so it will be larger.
Also the final file max has larger size as expected due to linked libraries. But the size of .o file makes me think that .o file doesn't have binary strings but something else. Please correct me if I am wrong somewhere.