Hi,
I am trying to produce the assembly listing of the Bran's Kernel Dev.
I tried to use this command, to produce the assembly main.s
gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o main.o -S main.s main.c
But it did not work. What's wrong with this.
Any help will be appreciated.
How to produce the assembly from c using gcc
Re:How to produce the assembly from c using gcc
objdump -C -d -S --no-show-raw-insn kernel.exe > kernel.lst
works for me,
remove the -S to not try to interlace c source
remove the -C to not demangle c++ symbols
proxy
works for me,
remove the -S to not try to interlace c source
remove the -C to not demangle c++ symbols
proxy
Re:How to produce the assembly from c using gcc
You have both -c and -S, so you are telling it to produce both compiled output and assembly.jason7007 wrote:gcc .... -c -o main.o -S main.s main.c
You probably want gcc ...... -S -o main.S main.c
(read as: compile 'main.c', and put the assembly in 'main.S')
Re:How to produce the assembly from c using gcc
Hi,
Do you mean GCC can produce one file output format at a time only?
My next question is, how to produce the Intel syntax assembly output?
Thank you very much.
Do you mean GCC can produce one file output format at a time only?
My next question is, how to produce the Intel syntax assembly output?
Thank you very much.
Re:How to produce the assembly from c using gcc
can't as far as i know wihtout some third party software to convert the syntax