Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Nov 2012
C code and its associated assembly code
Can any one please guide me how to generate assembly code for a C coden using gcc compiler? The generated assembly code should have startup routine, initialisation routine, main routine and finalising routine.
Will be awaiting eagerly for the response. Thanks in advance.
-Janardhan N L
I believe you use the -S switch with the -c switch. -S will generate an appropriately named assembly source and the -c switch stops the linker from running, so the commandCode:
gcc -O2 -S -c helloworld.cShould you be sitting wondering,
Which Batman is the best,
There's only one true answer my friend,
It's Adam Bloody West!
The Fifth Continent