IndexCoreasmjit::Section

asmjit::Section Class Reference [¶]

Inheritance diagram for asmjit::Section:
asmjit::SectionOrLabelEntryExtraHeader

Section entry.

Member Functions

Accessors

uint32_t Section::section_id() constnodiscardnoexcept[¶]

Returns the section id.

const char* Section::name() constnodiscardnoexcept[¶]

Returns the section name, as a null terminated string.

uint8_t* Section::data()nodiscardnoexcept[1/2][¶]

Returns the section data.

const uint8_t* Section::data() constnodiscardnoexcept[2/2][¶]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

SectionFlags Section::flags() constnodiscardnoexcept[¶]

Returns the section flags.

bool Section::has_flag() constnodiscardnoexcept[¶]

Tests whether the section has the given flag.

void Section::assign_flags()noexcept[¶]

Assigns flags to the section (replaces all existing flags).

void Section::add_flags()noexcept[¶]

Adds flags to the section flags.

void Section::clear_flags()noexcept[¶]

Removes flags from the section flags.

uint32_t Section::alignment() constnodiscardnoexcept[¶]

Returns the minimum section alignment.

void Section::set_alignment(
uint32_t alignment
)noexcept[¶]

Sets the minimum section alignment.

int32_t Section::order() constnodiscardnoexcept[¶]

Returns the section order, which has a higher priority than section id.

uint64_t Section::offset() constnodiscardnoexcept[¶]

Returns the section offset, relative to base.

void Section::set_offset(
uint64_t offset
)noexcept[¶]

Set the section offset.

uint64_t Section::virtual_size() constnodiscardnoexcept[¶]

Returns the virtual size of the section.

Virtual size is initially zero and is never changed by AsmJit. It's normal if virtual size is smaller than size returned by buffer_size() as the buffer stores real data emitted by assemblers or appended by users.

Use real_size() to get the real and final size of this section.

void Section::set_virtual_size(
uint64_t virtual_size
)noexcept[¶]

Sets the virtual size of the section.

size_t Section::buffer_size() constnodiscardnoexcept[¶]

Returns the buffer size of the section.

uint64_t Section::real_size() constnodiscardnoexcept[¶]

Returns the real size of the section calculated from virtual and buffer sizes.

CodeBuffer& Section::buffer()nodiscardnoexcept[1/2][¶]

Returns the CodeBuffer used by this section.

const CodeBuffer& Section::buffer() constnodiscardnoexcept[2/2][¶]

Returns the CodeBuffer used by this section (const).

uint32_t Section::_alignment[¶]

Section alignment requirements (0 if no requirements).

int32_t Section::_order[¶]

Order (lower value means higher priority).

uint64_t Section::_offset[¶]

Offset of this section from base-address.

uint64_t Section::_virtual_size[¶]

Virtual size of the section (zero initialized sections).

FixedString<Globals::kMaxSectionNameSize + 1>Section::_name[¶]

Section name (max 35 characters, PE allows max 8).

CodeBuffer Section::_buffer[¶]

Code or data buffer.