<\/a><\/p>\n\u00a0<\/b><\/p>\n
Compiler :<\/b><\/p>\n
Compiler is the program which is used for translating source code from a high level programming language (like c,c++) to lower level programming language (like machine language).So, in this case we consider that output is in assembly language having extention .asm or .s.File name : Demo.asm<\/b>Add: PUSH ECX PUSH EDX ADD ECX,EDX ADD ECX,10 MOV EAX,ECXRETN<\/p>\n
<\/p>\n
Assembler :<\/b><\/p>\n
Assembler is a program which translates assembly language program to an object file , which<\/p>\n
contains the code in machine language. Object file does contain the machine code but still it is non-executable.<\/p>\n
<\/p>\n
Extention of object file is .obj.<\/p>\n
<\/p>\n
File name : Demo.obj<\/b><\/p>\n
10110110111000101001010<\/p>\n
10101110100010100101010<\/p>\n
10111011101110101110110<\/p>\n
00101110111011101110101<\/p>\n
00100010000100001001010<\/p>\n
10111011101110110111101<\/p>\n
01000100001111101110101<\/p>\n
\u00a0<\/b><\/p>\n
Linker :<\/b><\/p>\n
A Linker is a program which takes one or more object files and combines them into a single<\/p>\n
executable program having extension .exe.<\/p>\n
<\/p>\n
File name : Demo.exe<\/b><\/p>\n
\u00a0<\/b><\/p>\n
Demo.obj Other.obj<\/b><\/p>\n
10110110111000101001110 10100110111000101001010<\/p>\n
10101110100010100001010 10110111111000101001010<\/p>\n
10111011101110101010110 10110110111000101001011<\/p>\n
10101110111011101110101 + <\/b>00100010000100001001110<\/p>\n
10100010000100001001010 00100010000100001001011<\/p>\n
00111011101110110111101 00100010000100001001011<\/p>\n
11000100001111101110101 10111011101110101110111<\/p>\n
\u00a0<\/b><\/p>\n
Demo.exe<\/b><\/p>\n
10101110100010100101010<\/p>\n
10111011101110101110110<\/p>\n
00101110111011101110101<\/p>\n
00100010000100001001010<\/p>\n
10111011101110110111101<\/p>\n
01000100001111101110101<\/p>\n
10101110100010100101010<\/p>\n
10111011101110101110110<\/p>\n
00101110111011101110101<\/p>\n
00100010000100001001010<\/p>\n
10111011101110110111101<\/p>\n
01000100001111101110101<\/p>\n
\u00a0<\/b><\/p>\n
Loader :<\/b><\/p>\n
A Loader is a program which is the part of OS i.e. operating system that is responsible for loading programs.<\/p>\n
It places program in memory (RAM) and prepares them for the execution and loading a program<\/p>\n
involves reading a contents of an executable file like text , data into the memory.<\/p>\n
<\/p>\n
Demo.exe running in RAM<\/p>\n
10101110100010100101010<\/p>\n
10111011101110101110110<\/p>\n
00101110111011101110101<\/p>\n
00100010000100001001010<\/p>\n
10111011101110110111101<\/p>\n
01000100001111101110101<\/p>\n
10101110100010100101010<\/p>\n
10111011101110101110110<\/p>\n
00101110111011101110101<\/p>\n
00100010000100001001010<\/p>\n
10111011101110110111101<\/p>\n
01000100001111101110101<\/p>\n
<\/p>\n
<\/a><\/p>\n <\/p>\n
Set of the Commands which will elaborate the Toolchain components :-<\/b><\/p>\n
Step 1. <\/b>Create a file name as Demo.c which contains simple C program.<\/p>\n
\u00a0<\/b><\/p>\n
Step 2. <\/b>Compile that file using command<\/p>\n
# gcc -S -o Demo.S Demo.c<\/b><\/p>\n
This command gives output file in assembly language named as Demo.S<\/p>\n
\u00a0<\/b><\/p>\n
Step 3. <\/b>Pass that Assembly file to assembler which gives output as a object file named as<\/p>\n
Demo.o<\/p>\n
# as -o Demo.o Demo.S<\/b><\/p>\n
\u00a0<\/b><\/p>\n
Step 4. <\/b>Pass that object file to Linker which gives output as a executable file.<\/p>\n
# ld -o Demo -lc -dynamic-linker \/lib\/ld-linux.so.2 Demo.o -e main<\/b><\/p>\n
\u00a0<\/b><\/p>\n
Step 5. <\/b>Run that executable using<\/p>\n
# .\/Demo<\/b><\/p>\n","protected":false},"excerpt":{"rendered":"
A Toolchain is the set of Programming Tools that are used to create software. The Tools are used in a chain , so that the output of each tool becomes the input for the next tool. Editor: Editor is program in which we can write our code and edit that code. Gedit , kwrite […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,3],"tags":[7,8],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/techliebe.com\/wp-json\/wp\/v2\/posts\/66"}],"collection":[{"href":"https:\/\/techliebe.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techliebe.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techliebe.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techliebe.com\/wp-json\/wp\/v2\/comments?post=66"}],"version-history":[{"count":3,"href":"https:\/\/techliebe.com\/wp-json\/wp\/v2\/posts\/66\/revisions"}],"predecessor-version":[{"id":78,"href":"https:\/\/techliebe.com\/wp-json\/wp\/v2\/posts\/66\/revisions\/78"}],"wp:attachment":[{"href":"https:\/\/techliebe.com\/wp-json\/wp\/v2\/media?parent=66"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techliebe.com\/wp-json\/wp\/v2\/categories?post=66"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techliebe.com\/wp-json\/wp\/v2\/tags?post=66"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}