what is the difference between compiler and assembler?
what is the difference between compiler and assembler?
EmbLogic Research & Competency Development Labs
Phone: +91 9818467776, 8527567776, 9650467776
Email: info@emblogic.com
Copyright © EmbLogic Embedded Technologies Pvt. Ltd.
Compiler converts source code in high level language(.c format) to an executable machine code(.elf format).
Assembler on the other hand converts low level language like assembly language code to a object code(.out format)which needs to be linked by a linker for generating machine code(.so format).
Compiler is used to high level language (.c ) file to .s file which is low level assembly language file (.s format)
use command
#gcc -S hello.c //to get hello.s file
In case of assembler this assembly language (.s) file will be converted into object file (.o) .
use command
#gcc -c hello.c // to get hello.o file
compiler and assembler are used to perform 2 steps of compilation Process .