Hi, I'm new to programming in linux and I know GCC has the reputation of being very flexible I have a few questions that I would really appreciate someone answer:
I really just want to understand how to write in assembly and compile it without the ELF format header. If I'm trying to write a bootloader I don't understand how compiling a file with inline assembly will not have the ELF header messing up the execution from the first sector.
Second, how is that I'm able to assemble a .S file using due to syntax:
gcc -c bootloader.S
but not:
as bootloader.S
Isn't 'as' used by gcc? so why doesn't it recognize the syntax of the file if gcc does?
Would it be better to use NASM for this purpose?