<html lang="en"> <head> <title>Section Input - Untitled</title> <meta http-equiv="Content-Type" content="text/html"> <meta name="description" content="Untitled"> <meta name="generator" content="makeinfo 4.13"> <link title="Top" rel="start" href="index.html#Top"> <link rel="up" href="Sections.html#Sections" title="Sections"> <link rel="prev" href="Sections.html#Sections" title="Sections"> <link rel="next" href="Section-Output.html#Section-Output" title="Section Output"> <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> <!-- This file documents the BFD library. Copyright (C) 1991-2015 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.--> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"><!-- pre.display { font-family:inherit } pre.format { font-family:inherit } pre.smalldisplay { font-family:inherit; font-size:smaller } pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } span.sc { font-variant:small-caps } span.roman { font-family:serif; font-weight:normal; } span.sansserif { font-family:sans-serif; font-weight:normal; } --></style> </head> <body> <div class="node"> <a name="Section-Input"></a> <p> Next: <a rel="next" accesskey="n" href="Section-Output.html#Section-Output">Section Output</a>, Previous: <a rel="previous" accesskey="p" href="Sections.html#Sections">Sections</a>, Up: <a rel="up" accesskey="u" href="Sections.html#Sections">Sections</a> <hr> </div> <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>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>Names need not be unique; for example a COFF file may have several sections named <code>.data</code>. <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>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. </body></html>