| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <html> |
| <!-- This file documents the BFD library. |
| |
| Copyright (C) 1991 - 2013 Free Software Foundation, Inc. |
| |
| Permission is granted to copy, distribute and/or modify this document |
| under the terms of the GNU Free Documentation License, Version 1.3 or |
| any later version published by the Free Software Foundation; with the |
| Invariant Sections being "GNU General Public License" and "Funding |
| Free Software", the Front-Cover texts being (a) (see below), and with |
| the Back-Cover Texts being (b) (see below). A copy of the license is |
| included in the section entitled "GNU Free Documentation License". |
| |
| (a) The FSF's Front-Cover Text is: |
| |
| A GNU Manual |
| |
| (b) The FSF's Back-Cover Text is: |
| |
| You have freedom to copy and modify this GNU Manual, like GNU |
| software. Copies published by the Free Software Foundation raise |
| funds for GNU development. --> |
| <!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ --> |
| <head> |
| <title>Untitled Document: Section Input</title> |
| |
| <meta name="description" content="Untitled Document: Section Input"> |
| <meta name="keywords" content="Untitled Document: Section Input"> |
| <meta name="resource-type" content="document"> |
| <meta name="distribution" content="global"> |
| <meta name="Generator" content="makeinfo"> |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| <link href="index.html#Top" rel="start" title="Top"> |
| <link href="BFD-Index.html#BFD-Index" rel="index" title="BFD Index"> |
| <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> |
| <link href="Sections.html#Sections" rel="up" title="Sections"> |
| <link href="Section-Output.html#Section-Output" rel="next" title="Section Output"> |
| <link href="Sections.html#Sections" rel="prev" title="Sections"> |
| <style type="text/css"> |
| <!-- |
| a.summary-letter {text-decoration: none} |
| blockquote.smallquotation {font-size: smaller} |
| div.display {margin-left: 3.2em} |
| div.example {margin-left: 3.2em} |
| div.indentedblock {margin-left: 3.2em} |
| div.lisp {margin-left: 3.2em} |
| div.smalldisplay {margin-left: 3.2em} |
| div.smallexample {margin-left: 3.2em} |
| div.smallindentedblock {margin-left: 3.2em; font-size: smaller} |
| div.smalllisp {margin-left: 3.2em} |
| kbd {font-style:oblique} |
| pre.display {font-family: inherit} |
| pre.format {font-family: inherit} |
| pre.menu-comment {font-family: serif} |
| pre.menu-preformatted {font-family: serif} |
| pre.smalldisplay {font-family: inherit; font-size: smaller} |
| pre.smallexample {font-size: smaller} |
| pre.smallformat {font-family: inherit; font-size: smaller} |
| pre.smalllisp {font-size: smaller} |
| span.nocodebreak {white-space:nowrap} |
| span.nolinebreak {white-space:nowrap} |
| span.roman {font-family:serif; font-weight:normal} |
| span.sansserif {font-family:sans-serif; font-weight:normal} |
| ul.no-bullet {list-style: none} |
| --> |
| </style> |
| |
| |
| </head> |
| |
| <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> |
| <a name="Section-Input"></a> |
| <div class="header"> |
| <p> |
| Next: <a href="Section-Output.html#Section-Output" accesskey="n" rel="next">Section Output</a>, Previous: <a href="Sections.html#Sections" accesskey="p" rel="prev">Sections</a>, Up: <a href="Sections.html#Sections" accesskey="u" rel="up">Sections</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="BFD-Index.html#BFD-Index" title="Index" rel="index">Index</a>]</p> |
| </div> |
| <hr> |
| <a name="Section-input"></a> |
| <h4 class="subsection">2.6.1 Section input</h4> |
| <p>When a BFD is opened for reading, the section structures are |
| created and attached to the BFD. |
| </p> |
| <p>Each section has a name which describes the section in the |
| outside world—for example, <code>a.out</code> would contain at least |
| three sections, called <code>.text</code>, <code>.data</code> and <code>.bss</code>. |
| </p> |
| <p>Names need not be unique; for example a COFF file may have several |
| sections named <code>.data</code>. |
| </p> |
| <p>Sometimes a BFD will contain more than the “natural” number of |
| sections. A back end may attach other sections containing |
| constructor data, or an application may add a section (using |
| <code>bfd_make_section</code>) to the sections attached to an already open |
| BFD. For example, the linker creates an extra section |
| <code>COMMON</code> for each input file’s BFD to hold information about |
| common storage. |
| </p> |
| <p>The raw data is not necessarily read in when |
| the section descriptor is created. Some targets may leave the |
| data in place until a <code>bfd_get_section_contents</code> call is |
| made. Other back ends may read in all the data at once. For |
| example, an S-record file has to be read once to determine the |
| size of the data. An IEEE-695 file doesn’t contain raw data in |
| sections, but data and relocation expressions intermixed, so |
| the data area has to be parsed to get out the data and |
| relocations. |
| </p> |
| |
| |
| |
| </body> |
| </html> |