[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.3 The BFD view of a file

BFD uses generic structures to manage information. It translates data into the generic form when reading files, and out of the generic form when writing files.

BFD describes a file as a pointer to the `bfd' type. A `bfd' is composed of the following elements. The BFD information can be displayed using the `objdump' program with various options.

general information
The object file format, a few general flags, the start address.
architecture
The architecture, including both a general processor type (m68k, MIPS etc.) and a specific machine number (m68000, R4000, etc.).
sections
A list of sections.
symbols
A symbol table.

BFD represents a section as a pointer to the `asection' type. Each section has a name and a size. Most sections also have an associated block of data, known as the section contents. Sections also have associated flags, a virtual memory address, a load memory address, a required alignment, a list of relocations, and other miscellaneous information.

BFD represents a relocation as a pointer to the `arelent' type. A relocation describes an action which the linker must take to modify the section contents. Relocations have a symbol, an address, an addend, and a pointer to a howto structure which describes how to perform the relocation. For more information, see 6. BFD relocation handling.

BFD represents a symbol as a pointer to the `asymbol' type. A symbol has a name, a pointer to a section, an offset within that section, and some flags.

Archive files do not have any sections or symbols. Instead, BFD represents an archive file as a file which contains a list of `bfd's. BFD also provides access to the archive symbol map, as a list of symbol names. BFD provides a function to return the `bfd' within the archive which corresponds to a particular entry in the archive symbol map.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by system on December, 2 2004 using texi2html