Halide
|
Describes a section of an object file. More...
#include <Elf.h>
Public Types | |
enum | Type : uint32_t { SHT_NULL = 0, SHT_PROGBITS = 1, SHT_SYMTAB = 2, SHT_STRTAB = 3, SHT_RELA = 4, SHT_HASH = 5, SHT_DYNAMIC = 6, SHT_NOTE = 7, SHT_NOBITS = 8, SHT_REL = 9, SHT_SHLIB = 10, SHT_DYNSYM = 11, SHT_LOPROC = 0x70000000, SHT_HIPROC = 0x7fffffff, SHT_LOUSER = 0x80000000, SHT_HIUSER = 0xffffffff } |
enum | Flag : uint32_t { SHF_WRITE = 0x1, SHF_ALLOC = 0x2, SHF_EXECINSTR = 0x4, SHF_MASKPROC = 0xf0000000 } |
typedef std::vector< Relocation > | RelocationList |
typedef RelocationList::iterator | relocation_iterator |
typedef RelocationList::const_iterator | const_relocation_iterator |
typedef std::vector< char >::iterator | contents_iterator |
typedef std::vector< char >::const_iterator | const_contents_iterator |
Public Member Functions | |
Section ()=default | |
Section (const std::string &name, Type type) | |
Section & | set_name (const std::string &name) |
const std::string & | get_name () const |
Section & | set_type (Type type) |
Type | get_type () const |
Section & | set_flag (Flag flag) |
Section & | remove_flag (Flag flag) |
Section & | set_flags (uint32_t flags) |
uint32_t | get_flags () const |
bool | is_alloc () const |
bool | is_writable () const |
Section & | set_alignment (uint64_t alignment) |
uint64_t | get_alignment () const |
Section & | set_contents (std::vector< char > contents) |
template<typename It > | |
Section & | set_contents (It begin, It end) |
template<typename It > | |
Section & | append_contents (It begin, It end) |
template<typename It > | |
Section & | prepend_contents (It begin, It end) |
template<typename T > | |
Section & | set_contents (const std::vector< T > &contents) |
Set, append or prepend an object to the contents, assuming T is a trivially copyable datatype. More... | |
template<typename T > | |
Section & | append_contents (const T &x) |
template<typename T > | |
Section & | prepend_contents (const T &x) |
const std::vector< char > & | get_contents () const |
contents_iterator | contents_begin () |
contents_iterator | contents_end () |
const_contents_iterator | contents_begin () const |
const_contents_iterator | contents_end () const |
const char * | contents_data () const |
size_t | contents_size () const |
bool | contents_empty () const |
Section & | set_relocations (std::vector< Relocation > relocs) |
template<typename It > | |
Section & | set_relocations (It begin, It end) |
void | add_relocation (const Relocation &reloc) |
relocation_iterator | relocations_begin () |
relocation_iterator | relocations_end () |
iterator_range< relocation_iterator > | relocations () |
const_relocation_iterator | relocations_begin () const |
const_relocation_iterator | relocations_end () const |
iterator_range< const_relocation_iterator > | relocations () const |
size_t | relocations_size () const |
Section & | set_size (uint64_t size) |
Get or set the size of the section. More... | |
uint64_t | get_size () const |
Get or set the size of the section. More... | |
typedef std::vector<Relocation> Halide::Internal::Elf::Section::RelocationList |
typedef RelocationList::iterator Halide::Internal::Elf::Section::relocation_iterator |
typedef RelocationList::const_iterator Halide::Internal::Elf::Section::const_relocation_iterator |
typedef std::vector<char>::iterator Halide::Internal::Elf::Section::contents_iterator |
typedef std::vector<char>::const_iterator Halide::Internal::Elf::Section::const_contents_iterator |
|
default |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get or set the size of the section.
The size may be larger than the content.
Definition at line 309 of file Elf.h.
References Halide::max().
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 332 of file Elf.h.
Referenced by append_contents().
|
inline |
Definition at line 337 of file Elf.h.
Referenced by prepend_contents().
|
inline |
|
inline |
Definition at line 358 of file Elf.h.
References append_contents().
|
inline |
Definition at line 362 of file Elf.h.
References prepend_contents().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |