Lines Matching refs: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}.
13 * section prototypes::
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
53 section must be written. (If the section is being created from
54 scratch, @code{output_section} should probably point to the section
59 the output sections. The output section structure can be
60 considered a filter for the input section: the output section
62 input section determines the offset into the output section of
65 E.g., to create a section "O", starting at 0x100, 0x123 long,
71 section name "A"
74 output_section -----------> section name "O"
76 section name "B" | size 0x123
83 The data within a section is stored in a @dfn{link_order}.
85 abstraction allows a section to grow and shrink within itself.
100 @node typedef asection, section prototypes, Section Output, Sections
102 Here is the section structure:
108 /* The name of the section; the name isn't a copy, the pointer is
112 /* The next section in the list belonging to the BFD, or NULL. */
115 /* The previous section in the list belonging to the BFD, or NULL. */
121 /* A unique section number which can be used by assembler to
122 distinguish different sections with the same section name. */
125 /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */
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's size is fixed. Generic linker code will not
188 /* The section contains common symbols (symbols may be defined
195 /* The section contains only debugging information. For
197 strip tests this flag to see if a section can be
201 /* The contents of this section are held in memory pointed to
206 /* The contents of this section are to be excluded by the
211 /* The contents of this section are to be sorted based on the sum of
214 appended to the end of the section in an unspecified order. */
218 discarded, rather than being combined into a single section as
246 /* This section was created by the linker as part of dynamic
252 /* This section contains a section ID to distinguish different
253 sections with the same section name. */
256 /* This section should not be subject to garbage collection.
257 Also set to inform the linker that this section should not be
261 /* This section contains "short" data, and should be placed
265 /* Attempt to merge identical entities in the section.
274 /* This section contains data about section groups. */
277 /* The section is a COFF shared library section. This flag is
278 only for the linker. If this type of section appears in
288 /* This input section should be copied to output in reverse order
293 /* This section contains data which may be shared with other
297 /* Indicate that section has the purecode flag set. */
300 /* When a section with this flag is being linked, then if the size of
301 the input section is less than a page, it should not cross a page
302 boundary. If the size of the input section is one page or more,
307 /* This section has the SHF_X86_64_LARGE flag. This is ELF x86-64 only. */
310 /* Conditionally link this section; do not link if there are no
311 references found to any symbol in the section. This is for TI
315 /* This section contains vliw code. This is for Toshiba MeP only. */
318 /* All symbols, sizes and relocations in this section are octets
323 /* Indicate that section has the no read flag set. This happens
327 /* End of section flags. */
338 output sections that have an input section. */
367 /* Nonzero if this section uses RELA relocations, rather than REL. */
382 /* The virtual memory address of the section - where it will be
390 /* The load address of the section - where it would be in a
391 rom image; really only used for writing section header
395 /* The size of the section in *octets*, as it will be output.
396 Contains a value even if the section has no contents (e.g., the
400 /* For input sections, the original size on disk of the section, in
401 octets. This field should be set for any section whose size is
403 the linker relaxation scheme doesn't cache altered section and
406 section multiple times. For output sections, rawsize holds the
407 section size calculated on a previous linker relaxation pass. */
410 /* The compressed size of the section in octets. */
413 /* If this section is going to be output, then this value is the
414 offset in *bytes* into the output section of the first byte in the
415 input section (byte ==> smallest addressable unit on the
417 100th octet (8-bit quantity) in the output section, this value
422 /* The output section through which to map on output. */
425 /* If an input section, a pointer to a vector of relocation
426 records for the data in this section. */
429 /* If an output section, a pointer to a vector of pointers to
430 relocation records for the data in this section. */
436 /* The alignment requirement of the section, as an exponent of 2 -
443 /* File position of section data. */
468 /* Points to the kept section if this section is a link-once section,
472 /* When a section is being output, this value changes as more
476 /* What the section number is in the target world. */
481 /* If this is a constructor section then here is a list of the
485 /* The BFD which owns the section. */
488 /* A symbol which points at this section only. */
493 a list of input sections attached to an output section. Later,
503 /* Points to the output section this section is already assigned to,
508 /* Explicitly specified section type, if non-zero. */
515 @node section prototypes, , typedef asection, Sections
517 These are the functions exported by the section handling part of BFD.
522 Clears the section list, and also resets the section count and
529 Return the most recently created section attached to @var{abfd}
530 named @var{name}. Return NULL if no such section exists.
536 Given @var{sec} is a section returned by @code{bfd_get_section_by_name},
537 return the next most recently created section attached to the same
538 BFD with the same name, or if no such section exists in the same BFD and
539 IBFD is non-NULL, the next section with the same name in any input
540 BFD following IBFD. Return NULL on finding no section.
546 Return the linker created section attached to @var{abfd}
547 named @var{name}. Return NULL if no such section exists.
553 Call the provided function @var{func} for each section
562 It returns the first section for which @var{func} returns true,
569 Invent a section name that is unique in @var{abfd} by tacking
579 Create a new empty section called @var{name}
581 BFD @var{abfd}. An attempt to create a section with a name which
583 section chain.
603 Create a new empty section called @var{name} and attach it to the end of
604 the chain of sections for @var{abfd}. Create a new section even if there
605 is already a section with that name. Also set the attributes of the
606 new section to the value @var{flags}.
621 Create a new empty section called @var{name} and attach it to the end of
622 the chain of sections for @var{abfd}. Create a new section even if there
623 is already a section with that name.
639 bfd_set_error ()) without changing the section chain if there is already a
640 section named @var{name}. Also set the attributes of the new section to
649 bfd_set_error ()) without changing the section chain if there is already a
650 section named @var{name}. If there is an error, return @code{NULL} and set
657 Set the attributes of the section @var{sec} to the value @var{flags}.
665 The section cannot have one or more of the attributes
666 requested. For example, a .bss section in @code{a.out} may not
674 Rename section @var{sec} to @var{newname}.
680 Call the provided function @var{func} for each section
701 Call the provided function @var{operation} for each section
709 It returns the first section for which @var{operation} returns true.
729 @deftypefn {Function} bool bfd_set_section_contents (bfd *abfd, asection *section, const void *data…
730 Sets the contents of the section @var{section} in BFD
732 The data is written to the output section starting at offset
741 The output section does not have the @code{SEC_HAS_CONTENTS}
745 The section is unable to contain all of the data.
758 @deftypefn {Function} bool bfd_get_section_contents (bfd *abfd, asection *section, void *location, …
759 Read data from @var{section} in BFD @var{abfd}
761 offset of @var{offset} from the start of the input section,
765 flag set are requested or if the section does not have the
773 @deftypefn {Function} bool bfd_malloc_and_get_section (bfd *abfd, asection *section, bfd_byte **buf…
774 Read all data from @var{section} in BFD @var{abfd}
783 Copy private section information from @var{isec} in the BFD
784 @var{ibfd} to the section @var{osec} in the BFD @var{obfd}.
822 Returns true if the given section has a size that indicates