Me and my friend used GCC to convert the same .c file to .s for our assignment. But we both got different assembly language code.
Me OS :- Windows 10 using GCC 4.7.2
Friend OS:- Ubuntu using GCC 4.7.2
Me and my friend used GCC to convert the same .c file to .s for our assignment. But we both got different assembly language code.
Me OS :- Windows 10 using GCC 4.7.2
Friend OS:- Ubuntu using GCC 4.7.2
The program you have written is compiled to run on two different OS. Both has its own set of syscalls and calling conventions. The compiled code will have different way of passing parameter, registers used for passing the values around and selected optimisation level.