Hold the information to emit a _gp
(global pointer) symbol for the given
segment.
The _gp
symbol is used on MIPS builds that want to use the "small data"
sections. This allows to refences small objects using a single MIPS instruction
instead of two.
The _gp
symbol is usually defined as an offset into the start of the first
small section. It is defined this way to maximize the addressable range of this
technique. Both the section and the offset are configurable.
Every attribute listed is optional unless explicitly stated.
The _gp
symbol will be emitted just before this section.
segments:
- name: main
gp_info:
section: .sdata
Non-empty string.
.sdata
An offset into the the section, allowing the _gp
value to not point to the
start of the section, maximizing the available accessable range using the $gp
register.
segments:
- name: main
gp_info:
offset: 0x8000
Integers.
0x7FF0
If provide
is enabled then the _gp
symbol will only be set if it is
referenced by any linked code but is not defined in any object included in the
link.
See GNU LD documentation for
PROVIDE
.
This option can be combined with hidden
. For more info see the GNU
LD documentation for
PROVIDE_HIDDEN
.
Bool.
False
hidden
Allows defining the _gp
symbol to be hidden and won't be exported.
On a more technical sense, the binding of the generated symbol on the elf will
be marked as LOCAL
instead of GLOBAL
.
See GNU LD documentation for
HIDDEN
.
This option can be combined with provide
. For more info see the
GNU LD documentation for
PROVIDE_HIDDEN
.
Bool.
False
These fields allow to conditionally include or exclude a given segment depending on the current custom options.
Their syntax is the same as their file
counterparts.