Binary File Descriptor library
![]() | This article may require copy editing for grammar, style, cohesion, tone, or spelling. (July 2011) |
Binary File Descriptor library | |
---|---|
Original author(s) | Cygnus Solutions |
Repository | |
Written in | C |
Type | Library |
License | GNU General Public License |
The Binary File Descriptor library (BFD) is the GNU Project's main mechanism for the portable manipulation of object files in a variety of formats. As of 2003[update], it supports approximately 50 file formats for some 25 processor architectures.
Design
BFD works by presenting a common abstract view of object files. An object file has a "header" with descriptive info; a variable number of "sections" that each have a name, some attributes, and a block of data; a symbol table; relocation entries; and so forth.
Internally, BFD translates the data from the abstract view into the details of the bit/byte layout required by the target processor and file format. Its key services include handling byte order differences, such as between a little-endian host and big-endian target, correct conversion between 32-bit and 64-bit data, and details of address arithmetic specified by relocation entries.
Although BFD was originally designed to be a generic library usable by a wide variety of tools, the frequent need to tinker with the API to accommodate new systems' capabilities has tended to limit its use;[1][2][3] BFD's main clients are the GNU Assembler (GAS), GNU Linker (GLD), and other GNU Binary Utilities ("binutils") tools, and the GNU Debugger (GDB). As a result, BFD is not distributed separately, but is always included with releases of binutils and GDB. Nevertheless, BFD is a critical component in the use of GNU tools for embedded systems development.
The BFD lib can be used to read the structured data out of a core dump.
History
When David Henkel-Wallace of Cygnus Support proposed developing the library, as a way to open up new business opportunities for the company, Richard Stallman said (correctly) that it would be difficult; David's response was "BFD" (big fat deal). This became the library name,[4] and "Binary File Descriptor" was invented later as the meaning of the letters.
References
- ^ Langasek, Steve (2005-05-22). "Re: depending on shared libbfd from binutils-dev". debian-devel (Mailing list). Retrieved 2011-04-03.
{{cite mailing list}}
: More than one of|author=
and|last=
specified (help); Unknown parameter|mailinglist=
ignored (|mailing-list=
suggested) (help) - ^ Kuratomi, Toshio (2010-06-04). "binutils once more". Fedora-packaging (Mailing list). Retrieved 2011-04-03.
{{cite mailing list}}
: More than one of|author=
and|last=
specified (help); Unknown parameter|mailinglist=
ignored (|mailing-list=
suggested) (help) - ^ Taylor, Ian (2003-09-12). "Re: FreeBSD 4.6 - binutils 2.14 installs useless libbfd". binutils (Mailing list). Retrieved 2011-04-03.
{{cite mailing list}}
: More than one of|author=
and|last=
specified (help); Unknown parameter|mailinglist=
ignored (|mailing-list=
suggested) (help) - ^
"Binary File Descriptor Library manual — History". GNU Project. 2007. Retrieved 2008-04-08.
The name came from a conversation David Wallace was having with Richard Stallman about the library: RMS said that it would be quite hard—David said "BFD". Stallman was right, but the name stuck.
{{cite web}}
: Unknown parameter|month=
ignored (help)