Halide 19.0.0
Halide compiler and libraries
Loading...
Searching...
No Matches
Halide::Internal::Elf::Object Class Reference

Holds all of the relevant sections and symbols for an object. More...

#include <Elf.h>

Public Types

enum  Type : uint16_t {
  ET_NONE = 0 , ET_REL = 1 , ET_EXEC = 2 , ET_DYN = 3 ,
  ET_CORE = 4 , ET_LOPROC = 0xff00 , ET_HIPROC = 0xffff
}
 
typedef std::list< SectionSectionList
 
typedef SectionList::iterator section_iterator
 
typedef SectionList::const_iterator const_section_iterator
 
typedef std::list< SymbolSymbolList
 
typedef SymbolList::iterator symbol_iterator
 
typedef SymbolList::const_iterator const_symbol_iterator
 

Public Member Functions

 Object ()=default
 
Type get_type () const
 
uint16_t get_machine () const
 
uint32_t get_version () const
 
uint64_t get_entry () const
 
uint32_t get_flags () const
 
Objectset_type (Type type)
 
Objectset_machine (uint16_t machine)
 
Objectset_version (uint32_t version)
 
Objectset_entry (uint64_t entry)
 
Objectset_flags (uint32_t flags)
 
std::vector< char > write_shared_object (Linker *linker, const std::vector< std::string > &depedencies={}, const std::string &soname="")
 Write a shared object in memory.
 
section_iterator sections_begin ()
 
section_iterator sections_end ()
 
iterator_range< section_iteratorsections ()
 
const_section_iterator sections_begin () const
 
const_section_iterator sections_end () const
 
iterator_range< const_section_iteratorsections () const
 
size_t sections_size () const
 
section_iterator find_section (const std::string &name)
 
section_iterator add_section (const std::string &name, Section::Type type)
 
section_iterator add_relocation_section (const Section &for_section)
 
section_iterator erase_section (section_iterator i)
 
section_iterator merge_sections (const std::vector< section_iterator > &sections)
 
section_iterator merge_text_sections ()
 
symbol_iterator symbols_begin ()
 
symbol_iterator symbols_end ()
 
iterator_range< symbol_iteratorsymbols ()
 
const_symbol_iterator symbols_begin () const
 
const_symbol_iterator symbols_end () const
 
iterator_range< const_symbol_iteratorsymbols () const
 
size_t symbols_size () const
 
symbol_iterator find_symbol (const std::string &name)
 
const_symbol_iterator find_symbol (const std::string &name) const
 
symbol_iterator add_symbol (const std::string &name)
 

Static Public Member Functions

static std::unique_ptr< Objectparse_object (const char *data, size_t size)
 Parse an object in memory to an Object.
 

Detailed Description

Holds all of the relevant sections and symbols for an object.

Definition at line 458 of file Elf.h.

Member Typedef Documentation

◆ SectionList

Definition at line 472 of file Elf.h.

◆ section_iterator

Definition at line 473 of file Elf.h.

◆ const_section_iterator

Definition at line 474 of file Elf.h.

◆ SymbolList

Definition at line 476 of file Elf.h.

◆ symbol_iterator

Definition at line 477 of file Elf.h.

◆ const_symbol_iterator

Definition at line 478 of file Elf.h.

Member Enumeration Documentation

◆ Type

Enumerator
ET_NONE 
ET_REL 
ET_EXEC 
ET_DYN 
ET_CORE 
ET_LOPROC 
ET_HIPROC 

Definition at line 460 of file Elf.h.

Constructor & Destructor Documentation

◆ Object()

Halide::Internal::Elf::Object::Object ( )
default

Member Function Documentation

◆ get_type()

Type Halide::Internal::Elf::Object::get_type ( ) const
inline

Definition at line 496 of file Elf.h.

◆ get_machine()

uint16_t Halide::Internal::Elf::Object::get_machine ( ) const
inline

Definition at line 499 of file Elf.h.

◆ get_version()

uint32_t Halide::Internal::Elf::Object::get_version ( ) const
inline

Definition at line 502 of file Elf.h.

◆ get_entry()

uint64_t Halide::Internal::Elf::Object::get_entry ( ) const
inline

Definition at line 505 of file Elf.h.

◆ get_flags()

uint32_t Halide::Internal::Elf::Object::get_flags ( ) const
inline

Definition at line 508 of file Elf.h.

◆ set_type()

Object & Halide::Internal::Elf::Object::set_type ( Type type)
inline

Definition at line 512 of file Elf.h.

◆ set_machine()

Object & Halide::Internal::Elf::Object::set_machine ( uint16_t machine)
inline

Definition at line 516 of file Elf.h.

◆ set_version()

Object & Halide::Internal::Elf::Object::set_version ( uint32_t version)
inline

Definition at line 520 of file Elf.h.

◆ set_entry()

Object & Halide::Internal::Elf::Object::set_entry ( uint64_t entry)
inline

Definition at line 524 of file Elf.h.

◆ set_flags()

Object & Halide::Internal::Elf::Object::set_flags ( uint32_t flags)
inline

Definition at line 528 of file Elf.h.

◆ parse_object()

static std::unique_ptr< Object > Halide::Internal::Elf::Object::parse_object ( const char * data,
size_t size )
static

Parse an object in memory to an Object.

◆ write_shared_object()

std::vector< char > Halide::Internal::Elf::Object::write_shared_object ( Linker * linker,
const std::vector< std::string > & depedencies = {},
const std::string & soname = "" )

Write a shared object in memory.

◆ sections_begin() [1/2]

section_iterator Halide::Internal::Elf::Object::sections_begin ( )
inline

Definition at line 540 of file Elf.h.

◆ sections_end() [1/2]

section_iterator Halide::Internal::Elf::Object::sections_end ( )
inline

Definition at line 543 of file Elf.h.

◆ sections() [1/2]

iterator_range< section_iterator > Halide::Internal::Elf::Object::sections ( )
inline

Definition at line 546 of file Elf.h.

◆ sections_begin() [2/2]

const_section_iterator Halide::Internal::Elf::Object::sections_begin ( ) const
inline

Definition at line 549 of file Elf.h.

◆ sections_end() [2/2]

const_section_iterator Halide::Internal::Elf::Object::sections_end ( ) const
inline

Definition at line 552 of file Elf.h.

◆ sections() [2/2]

iterator_range< const_section_iterator > Halide::Internal::Elf::Object::sections ( ) const
inline

Definition at line 555 of file Elf.h.

◆ sections_size()

size_t Halide::Internal::Elf::Object::sections_size ( ) const
inline

Definition at line 558 of file Elf.h.

◆ find_section()

section_iterator Halide::Internal::Elf::Object::find_section ( const std::string & name)

◆ add_section()

section_iterator Halide::Internal::Elf::Object::add_section ( const std::string & name,
Section::Type type )

◆ add_relocation_section()

section_iterator Halide::Internal::Elf::Object::add_relocation_section ( const Section & for_section)

◆ erase_section()

section_iterator Halide::Internal::Elf::Object::erase_section ( section_iterator i)
inline

Definition at line 565 of file Elf.h.

◆ merge_sections()

section_iterator Halide::Internal::Elf::Object::merge_sections ( const std::vector< section_iterator > & sections)

◆ merge_text_sections()

section_iterator Halide::Internal::Elf::Object::merge_text_sections ( )

◆ symbols_begin() [1/2]

symbol_iterator Halide::Internal::Elf::Object::symbols_begin ( )
inline

Definition at line 572 of file Elf.h.

◆ symbols_end() [1/2]

symbol_iterator Halide::Internal::Elf::Object::symbols_end ( )
inline

Definition at line 575 of file Elf.h.

◆ symbols() [1/2]

iterator_range< symbol_iterator > Halide::Internal::Elf::Object::symbols ( )
inline

Definition at line 578 of file Elf.h.

◆ symbols_begin() [2/2]

const_symbol_iterator Halide::Internal::Elf::Object::symbols_begin ( ) const
inline

Definition at line 581 of file Elf.h.

◆ symbols_end() [2/2]

const_symbol_iterator Halide::Internal::Elf::Object::symbols_end ( ) const
inline

Definition at line 584 of file Elf.h.

◆ symbols() [2/2]

iterator_range< const_symbol_iterator > Halide::Internal::Elf::Object::symbols ( ) const
inline

Definition at line 587 of file Elf.h.

◆ symbols_size()

size_t Halide::Internal::Elf::Object::symbols_size ( ) const
inline

Definition at line 590 of file Elf.h.

◆ find_symbol() [1/2]

symbol_iterator Halide::Internal::Elf::Object::find_symbol ( const std::string & name)

◆ find_symbol() [2/2]

const_symbol_iterator Halide::Internal::Elf::Object::find_symbol ( const std::string & name) const

◆ add_symbol()

symbol_iterator Halide::Internal::Elf::Object::add_symbol ( const std::string & name)

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