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

#include <ELFHeader.h>

Inheritance diagram for elf::ELFSectionHeader:
Inheritance graph
[legend]
Collaboration diagram for elf::ELFSectionHeader:
Collaboration 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. More...
 

Public Attributes

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

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 218 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 222 of file ELFHeader.cpp.

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

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().

◆ 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(), and GetPltEntrySizeAndOffset().

◆ 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().

◆ 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: