Home | History | Annotate | Download | only in ld

Lines Matching full:sections

63 with no Invariant Sections, with no Front-Cover Texts, and with no
100 with no Invariant Sections, with no Front-Cover Texts, and with no
629 sections. This is ignored for other object file formats.
786 Turn off page alignment of sections, and disable linking against shared
796 Set the text and data sections to be readable and writable. Also, do
864 Leave relocation sections and contents in fully linked executables.
872 @cindex forcing the creation of dynamic sections
874 Force the output file to have dynamic sections. This option is specific
995 input sections with the same name, overriding output section assignments
1047 Combines multiple reloc sections and sorts them to make dynamic symbol
1088 Disables multiple reloc sections combining.
1284 @kindex --check-sections
1285 @kindex --no-check-sections
1286 @item --check-sections
1287 @itemx --no-check-sections
1292 allowances for sections in overlays. The default behaviour can be
1293 restored by using the command line switch @option{--check-sections}.
1295 force checking in that case by using the @option{--check-sections}
1411 @kindex --gc-sections
1412 @kindex --no-gc-sections
1414 @item --gc-sections
1415 @itemx --no-gc-sections
1416 Enable garbage collection of unused input sections. It is ignored on
1419 @samp{--no-gc-sections} on the command line.
1421 @samp{--gc-sections} decides which input sections are used by
1423 symbol and all sections containing symbols undefined on the
1424 command-line will be kept, as will sections containing symbols
1427 referenced. Once this initial set of sections has been determined,
1436 @kindex --print-gc-sections
1437 @kindex --no-print-gc-sections
1439 @item --print-gc-sections
1440 @itemx --no-print-gc-sections
1441 List all sections removed by garbage collection. The listing is
1443 collection has been enabled via the @samp{--gc-sections}) option. The
1444 default behaviour (of not listing the sections that are removed) can
1445 be restored by specifying @samp{--no-print-gc-sections} on the command
1790 sections. The symbol alignments considered are sixteen-byte or larger,
1813 Tries to creates extra sections in the output file so that no single
1819 support arbitrary sections. The linker will not split up individual
1820 input sections for redistribution, so if a single input section contains
1854 times as necessary to locate multiple sections in the command
2062 is, if the @code{SECTIONS} command does not specify a start address for
2063 the section (@pxref{SECTIONS}).
2142 generated code sections like PLT. This option is on by default
2289 information sections in an executable image at runtime, and so if neither
2363 Specify the file alignment. Sections in the file will always begin at
2649 Sets the section alignment. Sections in memory will always begin at
2909 The main purpose of the linker script is to describe how the sections in
2936 * SECTIONS:: SECTIONS Command
2955 among other things, a list of @dfn{sections}. We sometimes refer to a
2959 Each section in an object file has a name and a size. Most sections
2980 You can see the sections in an object file by using the @code{objdump}
3022 @samp{SECTIONS}. You use the @samp{SECTIONS} command to describe the
3025 The @samp{SECTIONS} command is a powerful command. Here we will
3028 @samp{.text}, @samp{.data}, and @samp{.bss} sections, respectively.
3029 Let's assume further that these are the only sections which appear in
3036 SECTIONS
3046 You write the @samp{SECTIONS} command as the keyword @samp{SECTIONS},
3050 The first line inside the @samp{SECTIONS} command of the above example
3056 @samp{SECTIONS} command, the location counter has the value @samp{0}.
3060 after the output section name, you list the names of the input sections
3063 means all @samp{.text} input sections in all input files.
3069 The remaining lines define the @samp{.data} and @samp{.bss} sections in
3080 sections will probably satisfy any alignment constraints, but the linker
3082 sections.
3148 @code{SECTIONS} commands, or in output section descriptions.
3301 memory region @var{region}. This allows a flexible mapping of output sections
3310 sections:
3324 part defining the output sections and a system dependent part mapping the
3325 output sections
3340 The base linker script that deals with the output sections follows. It
3346 SECTIONS
3481 augment the default @code{SECTIONS} with, for example, overlays. It
3485 sections. @xref{Location Counter}. The insertion happens after the
3486 linker has mapped input sections to output sections. Prior to the
3491 to @samp{-T} output sections before those in the default script. Here
3495 SECTIONS
3507 @kindex NOCROSSREFS(@var{sections})
3510 references among certain output sections.
3514 will not be. Any direct references between the two sections would be
3519 @command{ld} detects any cross references between the sections, it reports
3581 may only use this within a @code{SECTIONS} command. @xref{Location Counter}.
3588 statements within a @code{SECTIONS} command, or as part of an output
3589 section description in a @code{SECTIONS} command.
3599 SECTIONS
3628 SECTIONS
3656 SECTIONS
3787 @node SECTIONS
3788 @section SECTIONS Command
3789 @kindex SECTIONS
3790 The @code{SECTIONS} command tells the linker how to map input sections
3791 into output sections, and how to place the output sections in memory.
3793 The format of the @code{SECTIONS} command is:
3795 SECTIONS
3797 @var{sections-command}
3798 @var{sections-command}
3803 Each @var{sections-command} may of be one of the following:
3817 @code{SECTIONS} command for convenience in using the location counter in
3825 If you do not use a @code{SECTIONS} command in your linker script, the
3827 section in the order that the sections are first encountered in the
3828 input files. If all input sections are present in the first file, for
3829 example, the order of sections in the output file will match the order
3862 Most output sections do not use most of the optional section attributes.
3867 the next @var{sections-command} looks like a continuation of the expression.
3889 support a limited number of sections, such as @code{a.out}, the name
3892 output format supports any number of sections, but with numbers and not
3954 input sections.
3969 sections are ignored).
3973 @cindex input sections
3974 @cindex mapping input sections to output sections
3978 You use output sections to tell the linker how to lay out your program
4000 sections with a particular name in the output section. For example, to
4001 include all input @samp{.text} sections, you would write:
4013 will cause all .ctors sections from all files except @file{crtend.o} and
4023 @samp{.rdata} input sections will appear in the output section. In the
4026 @samp{.text} input sections will appear first, followed by all
4027 @samp{.rdata} input sections.
4029 You can specify a file name to include sections from a particular file.
4036 To refine the sections that are included based on the section flags
4039 Here is a simple example for using Section header flags for ELF sections:
4043 SECTIONS @{
4079 If you use a file name without a list of sections, then all sections in
4144 Normally, the linker will place files and sections matched by wildcards
4148 @code{SORT_BY_NAME} keyword is used, the linker will sort the files or sections
4153 difference is @code{SORT_BY_ALIGNMENT} will sort sections into
4160 difference is @code{SORT_BY_INIT_PRIORITY} will sort sections into
4173 It will sort the input sections by name first, then by alignment if two
4174 sections have the same name.
4177 It will sort the input sections by alignment first, then by name if two
4178 sections have the same alignment.
4200 @option{--sort-sections alignment} is equivalent to
4215 If you ever get confused about where input sections are going, use the
4217 precisely how input sections are mapped to output sections.
4221 sections in @samp{.text} and all @samp{.bss} sections in @samp{.bss}.
4227 SECTIONS @{
4246 other input sections. You can use this to place common symbols from a
4276 When link-time garbage collection is in use (@samp{--gc-sections}),
4277 it is often useful to mark sections that should not be eliminated.
4285 to read all of the sections from file @file{all.o} and place them at the
4291 All of the remaining @samp{.input1} and @samp{.input2} sections from any
4296 SECTIONS @{
4364 SECTIONS @{@ .text : @{@ *(.text) @}@ LONG(1) .data : @{@ *(.data) @}@ @}@
4368 SECTIONS @{@ .text : @{@ *(.text) ; LONG(1) @}@ .data : @{@ *(.data) @}@ @}@
4377 gaps left due to the required alignment of input sections) are filled
4422 arbitrary sections, such as ECOFF and XCOFF, the linker will
4445 and @code{.dtors} sections. Placing the following sequence into your
4467 @code{.ctors} and @code{.dtors} sections, use @samp{*(SORT_BY_NAME(.ctors))} and
4480 @cindex discarding sections
4481 @cindex sections, discarding
4482 @cindex removing sections
4483 The linker will not normally create output sections with no contents.
4484 This is for convenience when referring to input sections that may or
4492 sections are not all empty. Other link script directives that allocate
4501 on discarded output sections, except when the linker script defines
4508 input sections. Any input sections which are assigned to an output
4570 the input sections which map into it. You can override this by using
4576 SECTIONS @{
4632 example, the following linker script creates three output sections: one
4642 SECTIONS
4692 sections, whether larger or smaller.
4698 @cindex constraints on output sections
4700 of its input sections are read-only or all of its input sections are
4708 @cindex memory regions and sections
4716 SECTIONS @{ ROM : @{ *(.text) @} >rom @}
4724 @cindex program headers and sections
4727 one or more segments, then all subsequent allocated sections will be
4736 SECTIONS @{ .text : @{ *(.text) @} :text @}
4749 alignment of input sections) will be filled with the value, repeated as
4764 SECTIONS @{ .text : @{ *(.text) @} =0x90909090 @}
4772 An overlay description provides an easy way to describe sections which
4775 copy the overlaid sections in and out of the runtime memory address as
4781 @code{OVERLAY} command is used within a @code{SECTIONS} command, like an
4808 those within the general @code{SECTIONS} construct (@pxref{SECTIONS}),
4810 sections within an @code{OVERLAY}.
4813 the next @var{sections-command} looks like a continuation of the expression.
4815 The sections are all defined with the same starting address. The load
4816 addresses of the sections are arranged such that they are consecutive in
4823 references among the sections, the linker will report an error. Since
4824 the sections all run at the same address, it normally does not make
4834 symbols to move the overlaid sections around as necessary.
4840 @code{SECTIONS} construct.
4898 can then assign sections to particular memory regions. The linker will
4900 regions that become too full. The linker will not shuffle sections
4928 @ref{SECTIONS}, if you do not specify an output section for some input
4979 or executable. The linker will place other sections which are not
4994 specific output sections into that memory region by using the
5000 output sections directed to a memory region are too large for the
5054 The @var{name} is used only for reference in the @code{SECTIONS} command
5059 is usual for them to map to sections in ascending load address order.
5064 sections in the segments. You use the @samp{:@var{phdr}} output section
5068 It is normal to put certain sections in more than one segment. This
5074 then the linker will place all subsequent allocatable sections which do
5076 convenience, since generally a whole set of contiguous sections will be
5130 The linker will normally set the segment flags based on the sections
5150 SECTIONS
5372 * Orphan Sections:: Orphan Sections
5469 @node Orphan Sections
5470 @subsection Orphan Sections
5472 Orphan sections are sections present in the input files which
5474 script. The linker will still copy these sections into the
5477 attempts to place orphan sections after non-orphan sections of the
5502 within a @code{SECTIONS} command. The @code{.} symbol may appear
5513 SECTIONS
5533 @cindex dot inside sections
5535 current containing object. Normally this is the @code{SECTIONS}
5542 SECTIONS
5559 the @samp{.text} input sections to fill this area. (If there is too
5563 the values from the @samp{.data} input sections and before the end of
5566 @cindex dot outside sections
5569 needs to place orphan sections. For example, given the following:
5572 SECTIONS
5590 sections. Instead, it assumes that all assignments or other
5597 SECTIONS
5618 SECTIONS
5718 other information (such as the sizes of output sections) is available
5721 The sizes of sections cannot be known until after allocation, so
5733 SECTIONS
5746 @cindex expression sections
5778 SECTIONS
5842 SECTIONS
5880 SECTIONS @{ @dots{}
5913 input sections:
5916 SECTIONS @{ @dots{}
5942 SECTIONS@{ @dots{}
5975 This expression can only be used directly in @code{SECTIONS} commands, not in
6026 SECTIONS @{ @dots{}
6078 ``bss'' sections, but you can use @code{SEGMENT_START} with any segment
6090 SECTIONS@{ @dots{}
6149 sections describe them. Machines where @command{ld} has no additional
6582 from the input sections.
6639 stub sections located between groups of input sections.
6641 sections handled by one stub section. Since branch offsets are signed,
6642 a stub section may serve two groups of input sections, one group before
6645 prediction) that stub sections only serve one group of input sections.
6653 Note that @samp{--stub-group-size} does not split input sections. A
6655 create a larger group (of one section). If input sections are too
6760 @cindex MSP430 extra sections
6761 The linker will recognize some extra sections which are MSP430 specific:
6782 The last two sections are used by gcc.
6921 sections compared to older BSS PLT and GOT placement. The location of
6966 by @command{ld} in stub sections located between groups of input sections.
6968 sections handled by one stub section. Since branch offsets are signed,
6969 a stub section may serve two groups of input sections, one group before
6972 prediction) that stub sections only serve one group of input sections.
6980 Note that @samp{--stub-group-size} does not split input sections. A
6982 create a larger group (of one section). If input sections are too
7017 the action of @samp{--gc-sections} or linker script @code{/DISCARD/}.
7033 reference the TOC in code sections. A reloc in a deleted code section
7052 grouping code sections such that each group uses less than 64K for its
7054 calls. @command{ld} does not split apart input sections, so cannot
7062 By default, @command{ld} sorts TOC sections so that those whose file
7064 placed first, followed by TOC sections referenced by code generated
7065 with PowerPC64 gcc's @code{-mcmodel=small}, and lastly TOC sections
7162 @command{ld} does this by examining symbols in code sections to
7693 @code{SECTIONS} commands so that lists of explicitly named sections in a
7699 SECTIONS
7709 and @code{.text} sections from different object files to ensure that the
7711 interleaving might place the @code{.literal} sections from an initial
7712 group of files followed by the @code{.text} sections of that group of
7713 files. Then, the @code{.literal} sections from the rest of the files
7714 and the @code{.text} sections from the rest of the files would follow.
8033 file format, since it only has three sections and MRI scripts lack some
8055 Normally, @command{ld} includes in the output file all sections from all
8057 @code{ABSOLUTE} command to restrict the sections that will be present in
8059 script, then only the sections named explicitly in @code{ABSOLUTE}
8061 input sections (whatever you select on the command line, or using
8131 Normally, @command{ld} orders the sections in its output file in the
8134 sections you list with @code{ORDER} will appear first in your output