Lines Matching full:section

1 @section Sections
3 section abstraction. A single BFD may have any number of
7 Sections are supported in BFD in @code{section.c}.
10 * Section Input::
11 * Section Output::
13 * section prototypes::
16 @node Section Input, Section Output, Sections, Sections
17 @subsection Section input
18 When a BFD is opened for reading, the section structures are
21 Each section has a name which describes the section in the
30 constructor data, or an application may add a section (using
32 BFD. For example, the linker creates an extra section
37 the section descriptor is created. Some targets may leave the
46 @node Section Output, typedef asection, Section Input, Sections
47 @subsection Section output
56 section must be written. (If the section is being created from
57 scratch, @code{output_section} should probably point to the section
62 the output sections. The output section structure can be
63 considered a filter for the input section: the output section
65 input section determines the offset into the output section of
68 E.g., to create a section "O", starting at 0x100, 0x123 long,
74 section name "A"
77 output_section -----------> section name "O"
79 section name "B" | size 0x123
86 The data within a section is stored in a @dfn{link_order}.
88 abstraction allows a section to grow and shrink within itself.
103 @node typedef asection, section prototypes, Section Output, Sections
105 Here is the section structure:
112 /* The name of the section; the name isn't a copy, the pointer is
119 /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */
122 /* The next section in the list belonging to the BFD, or NULL. */
125 /* The previous section in the list belonging to the BFD, or NULL. */
128 /* The field flags contains attributes of the section. Some
135 /* Tells the OS to allocate space for this section when loading.
136 This is clear for a section containing debug information only. */
139 /* Tells the OS to load the section from the file when loading.
140 This is clear for a .bss section. */
143 /* The section contains data still to be relocated, so there is
147 /* A signal to the OS that the section contains read only data. */
150 /* The section contains code only. */
153 /* The section contains data only. */
156 /* The section will reside in ROM. */
159 /* The section contains constructor information. This section
163 section for the type of name (e.g., @code{__CTOR_LIST__}), attaches
171 /* The section has contents - a data section could be
172 @code{SEC_ALLOC} | @code{SEC_HAS_CONTENTS}; a debug section could be
176 /* An instruction to the linker to not output the section
180 /* The section contains thread local data. */
183 /* The section has GOT references. This flag is only for the
186 in this section, which indicate to the linker that the section
191 /* The section contains common symbols (symbols may be defined
198 /* The section contains only debugging information. For
200 strip tests this flag to see if a section can be
204 /* The contents of this section are held in memory pointed to
209 /* The contents of this section are to be excluded by the
214 /* The contents of this section are to be sorted based on the sum of
217 appended to the end of the section in an unspecified order. */
221 discarded, rather than being combined into a single section as
249 /* This section was created by the linker as part of dynamic
255 /* This section should not be subject to garbage collection. */
258 /* This section contains "short" data, and should be placed
262 /* Attempt to merge identical entities in the section.
271 /* This section contains data about section groups. */
274 /* The section is a COFF shared library section. This flag is
275 only for the linker. If this type of section appears in
285 /* This section contains data which may be shared with other
289 /* When a section with this flag is being linked, then if the size of
290 the input section is less than a page, it should not cross a page
291 boundary. If the size of the input section is one page or more,
296 /* Conditionally link this section; do not link if there are no
297 references found to any symbol in the section. This is for TI
301 /* End of section flags. */
312 output sections that have an input section. */
332 /* Nonzero if this section uses RELA relocations, rather than REL. */
338 /* Nonzero if this section has TLS related relocations. */
341 /* Nonzero if this section has a gp reloc. */
344 /* Nonzero if this section needs the relax finalize pass. */
352 /* The virtual memory address of the section - where it will be
360 /* The load address of the section - where it would be in a
361 rom image; really only used for writing section header
365 /* The size of the section in octets, as it will be output.
366 Contains a value even if the section has no contents (e.g., the
370 /* For input sections, the original size on disk of the section, in
373 doesn't cache altered section and reloc contents (stabs, eh_frame,
375 needs to be kept to read the section multiple times.
376 For output sections, rawsize holds the section size calculated on
380 /* If this section is going to be output, then this value is the
381 offset in *bytes* into the output section of the first byte in the
382 input section (byte ==> smallest addressable unit on the
384 100th octet (8-bit quantity) in the output section, this value
389 /* The output section through which to map on output. */
392 /* The alignment requirement of the section, as an exponent of 2 -
396 /* If an input section, a pointer to a vector of relocation
397 records for the data in this section. */
400 /* If an output section, a pointer to a vector of pointers to
401 relocation records for the data in this section. */
410 /* File position of section data. */
435 /* Points to the kept section if this section is a link-once section,
439 /* When a section is being output, this value changes as more
443 /* What the section number is in the target world. */
448 /* If this is a constructor section then here is a list of the
452 /* The BFD which owns the section. */
455 /* A symbol which points at this section only. */
460 a list of input sections attached to an output section. Later,
479 /* The absolute section. */
483 /* Pointer to the undefined section. */
487 /* Pointer to the common section. */
490 /* Pointer to the indirect section. */
639 @node section prototypes, , typedef asection, Sections
640 @subsection Section prototypes
641 These are the functions exported by the section handling part of BFD.
650 Clears the section list, and also resets the section count and
666 @code{strcmp} on the name (or better yet, base it on the section flags
667 or something else) for each section.
680 Call the provided function @var{func} for each section
689 It returns the first section for which @var{func} returns true,
700 Invent a section name that is unique in @var{abfd} by tacking
713 Create a new empty section called @var{name}
715 BFD @var{abfd}. An attempt to create a section with a name which
717 section chain.
741 Create a new empty section called @var{name} and attach it to the end of
742 the chain of sections for @var{abfd}. Create a new section even if there
743 is already a section with that name. Also set the attributes of the
744 new section to the value @var{flags}.
762 Create a new empty section called @var{name} and attach it to the end of
763 the chain of sections for @var{abfd}. Create a new section even if there
764 is already a section with that name.
784 bfd_set_error ()) without changing the section chain if there is already a
785 section named @var{name}. Also set the attributes of the new section to
797 bfd_set_error ()) without changing the section chain if there is already a
798 section named @var{name}. If there is an error, return @code{NULL} and set
809 Set the attributes of the section @var{sec} in the BFD
817 The section cannot have one or more of the attributes
818 requested. For example, a .bss section in @code{a.out} may not
832 Call the provided function @var{func} for each section
844 section *p;
859 Call the provided function @var{operation} for each section
867 It returns the first section for which @var{operation} returns true.
893 (bfd *abfd, asection *section, const void *data,
897 Sets the contents of the section @var{section} in BFD
899 data is written to the output section starting at offset
908 The output section does not have the @code{SEC_HAS_CONTENTS}
921 (bfd *abfd, asection *section, void *location, file_ptr offset,
925 Read data from @var{section} in BFD @var{abfd}
927 offset of @var{offset} from the start of the input section,
931 flag set are requested or if the section does not have the
941 (bfd *abfd, asection *section, bfd_byte **buf);
944 Read all data from @var{section} in BFD @var{abfd}
955 Copy private section information from @var{isec} in the BFD
956 @var{ibfd} to the section @var{osec} in the BFD @var{obfd}.