template <>
struct RelocationTraits
Defined at line 92 of file ../../src/lib/elfldltl/include/lib/elfldltl/machine.h
This is the prototypical specialization that serves to document the
RelocationTraits API. It does not correspond to an actual machine
format; actual files with EM_NONE should not be produced or consumed
using these relocation types. But this can be used in unit tests.
Public Members
static optional kGot
static optional kTlsDesc
Enumerations
enum Type
| Name | Value |
|---|---|
| kNone | 0 |
| kRelative | 1 |
| kAbsolute | 2 |
| kPlt | 3 |
| kTlsModule | 4 |
| kTlsAbsolute | 5 |
| kTlsRelative | 6 |
This lists a small subset of the relocation type codes for the machine.
This doesn't define each per-machine type with its own canonical name.
Instead it only the types used by modern dynamic linking ABIs. Each of
the few types actually supported for dynamic linking has the same
semantics across machines, but each machine its own different name and
type code for each one. This type uses a uniform set of names for these,
but with the actual type values each machine encodes in Elf::Rel::type().
The semantics associated with each type name are described below.
In pseudo-code expressions below, these variables are used:
* `Base` is the load bias of the relocated module (i.e. the difference
between its runtime load address and its first PT_LOAD's p_vaddr).
* `SymbolBase` is the load bias of the module defining this symbol.
* `SymbolValue` is the st_value of the defining module's symbol.
* `Addend` is r_addend or equivalent extracted (signed) value.
The datum being relocated is located at Base + r_offset.
Defined at line 112 of file ../../src/lib/elfldltl/include/lib/elfldltl/machine.h