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

Generic representation of an ELF section header. More...

#include <ELFHeader.h>

Inheritance diagram for elf::ELFSectionHeader:
Inheritance graph
[legend]

Public Member Functions

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

Public Attributes

elf_word sh_name
 Section name string index.
 
elf_word sh_type
 Section type.
 
elf_xword sh_flags
 Section attributes.
 
elf_addr sh_addr
 Virtual address of the section in memory.
 
elf_off sh_offset
 Start of section from beginning of file.
 
elf_xword sh_size
 Number of bytes occupied in the file.
 
elf_word sh_link
 Index of associated section.
 
elf_word sh_info
 Extra section info (overloaded).
 
elf_xword sh_addralign
 Power of two alignment constraint.
 
elf_xword sh_entsize
 Byte size of each section entry.
 

Detailed Description

Generic representation of an ELF section header.

Definition at line 159 of file ELFHeader.h.

Constructor & Destructor Documentation

◆ ELFSectionHeader()

ELFSectionHeader::ELFSectionHeader ( )

Definition at line 224 of file ELFHeader.cpp.

Member Function Documentation

◆ Parse()

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

Parse an ELFSectionHeader entry from the given DataExtracter starting at position offset.

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 ELFSectionHeader was successfully read and false otherwise.

Definition at line 228 of file ELFHeader.cpp.

References lldb_private::DataExtractor::GetAddressByteSize(), GetMaxU64(), lldb_private::DataExtractor::GetU32(), sh_addr, sh_addralign, sh_flags, sh_link, and sh_name.

Referenced by elf::ELFHeader::ParseHeaderExtension().

Member Data Documentation

◆ sh_addr

elf_addr elf::ELFSectionHeader::sh_addr

Virtual address of the section in memory.

Definition at line 163 of file ELFHeader.h.

Referenced by ObjectFileELF::DumpELFSectionHeader(), and Parse().

◆ sh_addralign

elf_xword elf::ELFSectionHeader::sh_addralign

Power of two alignment constraint.

Definition at line 168 of file ELFHeader.h.

Referenced by ObjectFileELF::CreateSections(), ObjectFileELF::DumpELFSectionHeader(), GetPltEntrySizeAndOffset(), and Parse().

◆ sh_entsize

elf_xword elf::ELFSectionHeader::sh_entsize

◆ sh_flags

elf_xword elf::ELFSectionHeader::sh_flags

◆ sh_info

elf_word elf::ELFSectionHeader::sh_info

Extra section info (overloaded).

Definition at line 167 of file ELFHeader.h.

Referenced by ObjectFileELF::DumpELFSectionHeader(), elf::ELFHeader::ParseHeaderExtension(), and ObjectFileELF::RelocateDebugSections().

◆ sh_link

elf_word elf::ELFSectionHeader::sh_link

◆ sh_name

elf_word elf::ELFSectionHeader::sh_name

Section name string index.

Definition at line 160 of file ELFHeader.h.

Referenced by ObjectFileELF::DumpELFSectionHeader(), and Parse().

◆ sh_offset

elf_off elf::ELFSectionHeader::sh_offset

Start of section from beginning of file.

Definition at line 164 of file ELFHeader.h.

Referenced by ObjectFileELF::CreateSections(), ObjectFileELF::DumpELFSectionHeader(), and ObjectFileELF::GetSectionHeaderInfo().

◆ sh_size

elf_xword elf::ELFSectionHeader::sh_size

◆ sh_type

elf_word elf::ELFSectionHeader::sh_type

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