[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
ld
and PowerPC64 64-bit ELF Support ld
in stub sections located between groups of input sections.
`--stub-group-size' specifies the maximum size of a group of input
sections handled by one stub section. Since branch offsets are signed,
a stub section may serve two groups of input sections, one group before
the stub section, and one group after it. However, when using
conditional branches that require stubs, it may be better (for branch
prediction) that stub sections only serve one group of input sections.
A negative value for `N' chooses this scheme, ensuring that
branches to stubs always use a negative offset. Two special values of
`N' are recognized, `1' and `-1'. These both instruct
ld
to automatically size input section groups for the branch types
detected, with the same behaviour regarding stub placement as other
positive or negative values of `N' respectively.
Note that `--stub-group-size' does not split input sections. A single input section larger than the group size specified will of course create a larger group (of one section). If input sections are too large, it may not be possible for a branch to reach its stub.
ld
to label linker stubs with a local
symbol that encodes the stub type and destination.
ld
interprets version patterns
in a version script. Older PowerPC64 compilers emitted both a
function descriptor symbol with the same name as the function, and a
code entry symbol with the name prefixed by a dot (`.'). To
properly version a function `foo', the version script thus needs
to control both `foo' and `.foo'. The option
`--dotsyms', on by default, automatically adds the required
dot-prefixed patterns. Use `--no-dotsyms' to disable this
feature.
ld
normally performs some optimization of code
sequences used to access Thread-Local Storage. Use this option to
disable the optimization.
ld
normally removes .opd
section entries
corresponding to deleted link-once functions, or functions removed by
the action of `--gc-sections' or linker scrip /DISCARD/
.
Use this option to disable .opd
optimization.
.opd
entries spaced 16 bytes apart, overlapping the third word,
the static chain pointer (unused in C) with the first word of the next
entry. This option expands such entries to the full 24 bytes.
ld
normally removes unused .toc
section
entries. Such entries are detected by examining relocations that
reference the TOC in code sections. A reloc in a deleted code section
marks a TOC word as unneeded, while a reloc in a kept code section
marks a TOC word as needed. Since the TOC may reference itself, TOC
relocs are also examined. TOC words marked as both needed and
unneeded will of course be kept. TOC words without any referencing
reloc are assumed to be part of a multi-word entry, and are kept or
discarded as per the nearest marked preceding word. This works
reliably for compiler generated code, but may be incorrect if assembly
code is used to insert TOC entries. Use this option to disable the
optimization.
ld
extends this limit by
grouping code sections such that each group uses less than 64K for its
TOC entries, then inserts r2 adjusting stubs between inter-group
calls. ld
does not split apart input sections, so cannot
help if a single input file has a .toc
section that exceeds
64K, most likely from linking multiple files with ld -r
.
Use this option to turn off this feature.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |