struct relocation {
Elf32_Rela rela; struct relocation *next; }; |
rela holds the relocation information. And next points to the next relocation structure.
rela is of type Elf32_Rela (defined in sys/elf.h)
that has the following structure:
typedef struct {
Elf32_Addr r_offset; Elf32_Word r_info; Elf32_Sword r_addend; } Elf32_Rela; |
r_offset
This member gives the location at which to apply the relocation action. The value is the byte offset from the beginning of the section's object code to the instruction affected by the relocation.r_info
This member gives both the sequence number of the symbol, with respect to which the relocation must be made, and the type of relocation to apply. Table 2.3.1 shows four basic relocation types (defined in sys/elf_SPARC.h) and the instructions to apply to. For the complete set of relocation types, see Object File Format from docs.sun.com. Table 2.3.2 shows how to manipulate the value of r_info with macros (defined in sys/elf.h):Table 2.3.1 Relocation Types
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
r_addend
This member is always 0.table of content