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

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

#include <ELFHeader.h>

Public Member Functions

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

Static Public Member Functions

static unsigned RelocType32 (const ELFRel &rel)
 Returns the type when the given entry represents a 32-bit relocation.
 
static unsigned RelocType64 (const ELFRel &rel)
 Returns the type when the given entry represents a 64-bit relocation.
 
static unsigned RelocSymbol32 (const ELFRel &rel)
 Returns the symbol index when the given entry represents a 32-bit relocation.
 
static unsigned RelocSymbol64 (const ELFRel &rel)
 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.
 

Detailed Description

Represents a relocation entry with an implicit addend.

Definition at line 305 of file ELFHeader.h.

Constructor & Destructor Documentation

◆ ELFRel()

ELFRel::ELFRel ( )

Definition at line 414 of file ELFHeader.cpp.

Member Function Documentation

◆ Parse()

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

Parse an ELFRel 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 ELFRel entry was successfully read and false otherwise.

Definition at line 416 of file ELFHeader.cpp.

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

◆ RelocSymbol32()

static unsigned elf::ELFRel::RelocSymbol32 ( const ELFRel rel)
inlinestatic

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

Definition at line 337 of file ELFHeader.h.

References r_info.

◆ RelocSymbol64()

static unsigned elf::ELFRel::RelocSymbol64 ( const ELFRel rel)
inlinestatic

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

Definition at line 341 of file ELFHeader.h.

References r_info.

◆ RelocType32()

static unsigned elf::ELFRel::RelocType32 ( const ELFRel rel)
inlinestatic

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

Definition at line 328 of file ELFHeader.h.

References r_info.

◆ RelocType64()

static unsigned elf::ELFRel::RelocType64 ( const ELFRel rel)
inlinestatic

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

Definition at line 331 of file ELFHeader.h.

References r_info.

Member Data Documentation

◆ r_info

elf_xword elf::ELFRel::r_info

symbol index and type of relocation.

Definition at line 307 of file ELFHeader.h.

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

◆ r_offset

elf_addr elf::ELFRel::r_offset

Address of reference.

Definition at line 306 of file ELFHeader.h.

Referenced by Parse().


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