It depends on your gcc package. You probably have to find a
"cross-compiler" setup of GCC, rather than a native gcc install. A
native install would produce a binary that would be useful to the
native OS of the box.
OOTH, if you have a cross-compiler for whatever target/cpu/machine you
are trying to use, most likely one of the output options will be the
object format you are looking for, even if it wouldn't run on the OS
you are running the compiler on (ie. ELF on windows).
As mentioned, most Windows tools don't use ELF (although the Win32
port of TinyC does if you compile without linking).