LLDB mainline
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
elf::ELFRela Class Reference

Represents a relocation entry with an explicit addend. More...

#include <ELFHeader.h>

Public Member Functions

 ELFRela ()
 
bool Parse (const lldb_private::DataExtractor &data, lldb::offset_t *offset)
 Parse an ELFRela entry from the given DataExtractor starting at position offset.
 

Static Public Member Functions

static unsigned RelocType32 (const ELFRela &rela)
 Returns the type when the given entry represents a 32-bit relocation.
 
static unsigned RelocType64 (const ELFRela &rela)
 Returns the type when the given entry represents a 64-bit relocation.
 
static unsigned RelocSymbol32 (const ELFRela &rela)
 Returns the symbol index when the given entry represents a 32-bit relocation.
 
static unsigned RelocSymbol64 (const ELFRela &rela)
 Returns the symbol index when the given entry represents a 64-bit relocation.
 

Public Attributes

elf_addr r_offset
 Address of reference.
 
elf_xword r_info
 Symbol index and type of relocation.
 
elf_sxword r_addend
 Constant part of expression.
 

Detailed Description

Represents a relocation entry with an explicit addend.

Definition at line 346 of file ELFHeader.h.

Constructor & Destructor Documentation

◆ ELFRela()

ELFRela::ELFRela ( )

Definition at line 426 of file ELFHeader.cpp.

Member Function Documentation

◆ Parse()

bool ELFRela::Parse ( const lldb_private::DataExtractor data,
lldb::offset_t offset 
)

Parse an ELFRela entry from the given DataExtractor starting at position offset.

The address size of the DataExtractor determines if a 32 or 64 bit object is to be parsed.

Parameters
[in]dataThe DataExtractor to read from. The address size of the extractor determines if a 32 or 64 bit object should be read.
[in,out]offsetPointer to an offset in the data. On return the offset will be advanced by the number of bytes read.
Returns
True if the ELFRela entry was successfully read and false otherwise.

Definition at line 428 of file ELFHeader.cpp.

References lldb_private::DataExtractor::GetAddressByteSize(), GetMaxS64(), GetMaxU64(), r_addend, and r_offset.

◆ RelocSymbol32()

static unsigned elf::ELFRela::RelocSymbol32 ( const ELFRela rela)
inlinestatic

Returns the symbol index when the given entry represents a 32-bit relocation.

Definition at line 381 of file ELFHeader.h.

References r_info.

◆ RelocSymbol64()

static unsigned elf::ELFRela::RelocSymbol64 ( const ELFRela rela)
inlinestatic

Returns the symbol index when the given entry represents a 64-bit relocation.

Definition at line 387 of file ELFHeader.h.

References r_info.

◆ RelocType32()

static unsigned elf::ELFRela::RelocType32 ( const ELFRela rela)
inlinestatic

Returns the type when the given entry represents a 32-bit relocation.

Definition at line 370 of file ELFHeader.h.

References r_info.

◆ RelocType64()

static unsigned elf::ELFRela::RelocType64 ( const ELFRela rela)
inlinestatic

Returns the type when the given entry represents a 64-bit relocation.

Definition at line 375 of file ELFHeader.h.

References r_info.

Member Data Documentation

◆ r_addend

elf_sxword elf::ELFRela::r_addend

Constant part of expression.

Definition at line 349 of file ELFHeader.h.

Referenced by Parse().

◆ r_info

elf_xword elf::ELFRela::r_info

Symbol index and type of relocation.

Definition at line 348 of file ELFHeader.h.

Referenced by RelocSymbol32(), RelocSymbol64(), RelocType32(), and RelocType64().

◆ r_offset

elf_addr elf::ELFRela::r_offset

Address of reference.

Definition at line 347 of file ELFHeader.h.

Referenced by Parse().


The documentation for this class was generated from the following files: