Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

NOTE: CentOS Enterprise Linux is built from the Red Hat Enterprise Linux source code. Other than logo and name changes CentOS Enterprise Linux is compatible with the equivalent Red Hat version. This document applies equally to both Red Hat and CentOS Enterprise Linux.

2.11. binutils, the GNU Binary Utilities

binutils, the GNU binary utilities, include ar, nm, objcopy, objdump, ranlib, size, strings, and strip. For targets that use the ELF file format, there is also a tool called readelf.

There are three binary utilities, addr2line, windres, and dlltool, that are for use with Cygwin, the porting layer application for Win32 development. The most important of the binary utilities are objcopy and objdump.

  • objcopy is a tool to convert object and executable files. It can add and remove sections and symbols, but the most commonly used feature is its ability to change the file format. For example, it can convert an ELF or COFF format executable into an S-record or Intel I-Hex format file. These two formats are often used in building ROM images for standalone and embedded systems. For more information, refer to the objcopy Utility section in Using binutils, the Gnu Binary Utilities.

  • objdump is a tool to display information about the contents of an object or executable file. It can display symbol tables and section headers and it can also act as a disassembler. Objdump also knows about archives and libraries and can be used to display information on all of the object files inside them. For more information, refer to the objdump Utility section in Using binutils, the Gnu Binary Utilities.

    A few of the more useful options for objdump include: -h (to display section headers), -t (to display symbols), -p (to display private header information) and -d for assembler (to display a disassembly). -d normally only disassembles sections that are expected to contain instructions. To disassemble all sections, use -D instead. The option --prefix-addresses can be used to print a complete address on each line of the disassembler's output.

 
 
  Published under the terms of the GNU General Public License Design by Interspire