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.c"I used to be with it, then they changed what it was.
Now what was it isn't it, and what is it is weird and scary to me.
It'll happen to you too."
The Fifth Continent