First (and important!), file names have nothing to do with their
format. Rename pic.gif to pic.jpeg, and you still have a GIF picture.
The same, only more so, applies to binary files. GCC
defaults to the filename a.out, no matter if it's a.out format or (much more likely today) ELF format (on Linux) or PE format (on Windows).
That being said, your batchfile line
tells the compiler to
not create an executable at all, no matter the format, but to
generate a linker object file. Moreover, you explicitly told the compiler to
name the file kernel.o.
At this point, I
strongly suggest that you forget about the idea of doing anything kernel-related for at least one year, and begin with learning to code, and to use coding tools, with "normal" user-space applications.
You will save yourself - and us - lots of trouble that way.