Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home3/techlieb/public_html/wp-content/plugins/ditty-news-ticker/includes/class-ditty-api.php on line 346

Warning: Cannot modify header information - headers already sent by (output started at /home3/techlieb/public_html/wp-content/plugins/ditty-news-ticker/includes/class-ditty-api.php:346) in /home3/techlieb/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home3/techlieb/public_html/wp-content/plugins/ditty-news-ticker/includes/class-ditty-api.php:346) in /home3/techlieb/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home3/techlieb/public_html/wp-content/plugins/ditty-news-ticker/includes/class-ditty-api.php:346) in /home3/techlieb/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home3/techlieb/public_html/wp-content/plugins/ditty-news-ticker/includes/class-ditty-api.php:346) in /home3/techlieb/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home3/techlieb/public_html/wp-content/plugins/ditty-news-ticker/includes/class-ditty-api.php:346) in /home3/techlieb/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home3/techlieb/public_html/wp-content/plugins/ditty-news-ticker/includes/class-ditty-api.php:346) in /home3/techlieb/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home3/techlieb/public_html/wp-content/plugins/ditty-news-ticker/includes/class-ditty-api.php:346) in /home3/techlieb/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home3/techlieb/public_html/wp-content/plugins/ditty-news-ticker/includes/class-ditty-api.php:346) in /home3/techlieb/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831
{"id":66,"date":"2013-07-26T01:26:58","date_gmt":"2013-07-25T19:56:58","guid":{"rendered":"http:\/\/techliebe.com\/?p=66"},"modified":"2013-07-26T01:35:28","modified_gmt":"2013-07-25T20:05:28","slug":"toolchain","status":"publish","type":"post","link":"https:\/\/techliebe.com\/toolchain\/","title":{"rendered":"ToolChain"},"content":{"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.<\/p>\n

 <\/p>\n

Editor:<\/b><\/p>\n

Editor is program in which we can write our code and edit that code. Gedit , kwrite are the examples of editors.<\/p>\n

 <\/p>\n

File name : Demo.c<\/b><\/p>\n

#include<stdio.h><\/p>\n

#define MAX 10<\/p>\n

int Add(int No1, int No2)<\/p>\n

{<\/p>\n

Int Ans; \/\/Local Variable<\/p>\n

Ans = No1 + No2 + MAX ;<\/p>\n

printf(\u201cAddition of Two Numbers is %d\u201d,Ans);<\/p>\n

return Ans;<\/p>\n

}<\/p>\n

 <\/p>\n

Pre-processor:<\/b><\/p>\n

The Pre-processors provide the ability for the inclusion of header files, macro expantion, conditional compilation,and line control.<\/p>\n

Pre-processor takes lines beginning with ‘#’ as a directives. Because it does not know about the underlying language.<\/p>\n

After Preprocessing it will give the expanded code as a output having extension .i.<\/p>\n

 <\/p>\n

File name : Demo.i<\/b><\/p>\n

int printf( const char * format, …);<\/p>\n

int scanf( const char * format, …);<\/p>\n

int Add(int No1, int No2)<\/p>\n

{<\/p>\n

int Ans;<\/p>\n

Ans = No1 + No2 + 10 ;<\/p>\n

printf(\u201cAddition of Two Numbers is %d\u201d,Ans);<\/p>\n

return Ans;<\/p>\n

}<\/p>\n

 <\/p>\n

\"Tool<\/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

\"Tool<\/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}]}}