Summary of Contents for Red Hat ENTERPRISE LINUX 3 - DEVELOPER TOOLS GUIDE
Page 1
Red Hat Enterprise Linux 3 Developer Tools Guide...
Page 2
HTML, PDF, and RPM versions of the manuals are available on the Documentation CD and online at http://www.redhat.com/docs/. The GPG fingerprint of the security@redhat.com key is: CA 20 86 86 2B D6 9D FC 65 F6 EC C4 21 91 80 CD DB 42 A6 0E...
Table of Contents 1. Overview of Red Hat Enterprise Linux Developer Tools............1 2. Basic Principles of the Tools......................3 2.1. Compiler and Development Tools ..................3 2.2. Libraries ..........................3 2.3. Auxiliary Development Tools .................... 4 2.4. , the GNU Compiler Collection................... 4 2.5.
Using binutils, the Gnu Binary Utilities • HTML, PDF, and RPM versions of the manuals are available on the Documentation CD and online at http://www.redhat.com/docs/. For more information on the tools and their history, see the following websites: http://sources.redhat.com/ •...
Page 6
Chapter 1. Overview of Red Hat Enterprise Linux Developer Tools...
Chapter 2. Basic Principles of the Tools Red Hat Enterprise Linux Developer Tools’s C and C++ compilers, macro-assembler, debugger, bi- nary utilities, libraries, and other development tools provide productivity, flexibility, performance, and portability. This chapter begins with a summary of the tools, then describes each tool in more detail. To use a tool, open your system’s terminal shell window and enter the tool’s name as a command , for instance, invokes the compiler.
Chapter 2. Basic Principles of the Tools Library Description ANSI C runtime library libc C math subroutine library libm C++ class library libstdc++ 2.3. Auxiliary Development Tools The following components are also provided for general development: Component Description Assembler (refer to Section 2.6 , the GNU Assembler and Using as, the Gnu Assembler) Online documentation tools (refer to Section 2.12 Using info, the...
Chapter 2. Basic Principles of the Tools GNU assembler that produces binary code from assembly language code and puts it in an object • file (refer to Section 2.6 , the GNU Assembler). GNU linker that binds the code to addresses, links the startup file and libraries to an object file, •...
Chapter 2. Basic Principles of the Tools 2.5. , the GNU Preprocessor is a C-compatible macro preprocessor that works with the GNU compiler to direct the parsing of C preprocessor directives. Preprocessing directives are the lines in your program that start with a directive name (a sign followed by an identifier).
Chapter 2. Basic Principles of the Tools Special programs exist to manipulate object files. For example, can disassemble an object objdump file back into assembler source code and can group together multiple object files into an archive or library file. 2.6.2.
Chapter 2. Basic Principles of the Tools The linker uses a default script that compiles into the linker executable, if you do not supply one via command line option. Use the option to display the default linker script. Certain --verbose options (such as ) affect the default linker script.
Chapter 2. Basic Principles of the Tools target is usually the name of a file that a program generates; examples of targets are executable or object files. A target can also be the name of an action to carry out, such as with the clean command (a command that, deletes all files from a build directory before building).
Chapter 2. Basic Principles of the Tools how the commands work; it is up to you to supply commands that update the target file properly. All does is execute the commands in the rule you have specified when the target file needs updating. make For more details, refer to Using make...
2.13. Learn More About the Tools There are many sources to teach you more about GNU tools: For general information about the tools, see: http://www.redhat.com/docs/manuals/gnupro/ • For help with using the tools, see Chapter 3 Developing with Red Hat Enterprise Linux Developer •...
Page 16
Chapter 2. Basic Principles of the Tools...
Developer Tools Use the tutorials in this chapter to learn about standard native development with the tools. See http://www.redhat.com/docs/manuals/gnupro/ for details about the tools. 3.1. Create Source Code To start, create the following sample source code file and save it as .
Chapter 3. Developing with Red Hat Enterprise Linux Developer Tools 3.3. Run the Executable To run the program, use the following example: ./hello The program generates hello world! 3 + 4 = 7 and returns when the program exits. 3.4. Debug the Executable To start GDB, use the following commands: gdb hello After the initial copyright and configuration information, GDB returns its own prompt,...
Page 19
Chapter 3. Developing with Red Hat Enterprise Linux Developer Tools The following output displays: main (void) int b; a = 3; b = 4; printf ("Hello, world!\n"); foo (b); return 0; 7. To list a specific function code, use the command with the name of the function to be list display.
Chapter 3. Developing with Red Hat Enterprise Linux Developer Tools #1 0x15c in main () at hello.c:18 13. To exit the program and quit the debugger, type: quit 3.5. Assembler Listings The compiler normally turns a text based source file into a binary object file. It is possible however to instruct it to just convert the source code into assembler and stop there.
Page 21
Chapter 3. Developing with Red Hat Enterprise Linux Developer Tools You could also use the option to produce a dissassembly of all of the sections in an object file, not only those that have been marked as containing instructions, and to tell to disassemble objdump...
Page 22
Chapter 3. Developing with Red Hat Enterprise Linux Developer Tools...
Need help?
Do you have a question about the ENTERPRISE LINUX 3 - DEVELOPER TOOLS GUIDE and is the answer not in the manual?
Questions and answers