15 #include <featureTests.h>
16 #ifdef ROSE_ENABLE_BINARY_ANALYSIS
17 #include "sage3basic.h"
53 section = other.section;
61 section = other.section;
70 assert(section!=NULL);
88 rose_addr_t rva = addr;
121 assert(new_section==NULL || new_section->
is_mapped());
128 section = new_section;
182 sprintf(s,
"0x%08" PRIx64
" (%" PRIu64
")",
get_rva(),
get_rva());
186 sprintf(s,
" + 0x%08" PRIx64
" (%" PRIu64
")",
get_rel(),
get_rel());
194 operator<<(std::ostream &os,
const rose_rva_t &rva)
static rose_rva_t section_relative(SgAsmGenericSection *section, rose_addr_t offset)
Class method to construct a new RVA which is an offset from the beginning of a section.
rose_addr_t get_va() const
Return the absolute address if known.
rose_rva_t & bind(SgAsmGenericHeader *)
Binds this RVA to the best available section from the specified file header.
Contiguous region of a file.
rose_addr_t get_rva() const
Returns the numeric RVA.
bool is_mapped() const
Whether section desires to be mapped to memory.
A relative virtual address optionally associated with a SgAsmSection.
bool is_bound() const
Determines whether this RVA is associated with a file section.
rose_rva_t & set_rva(rose_addr_t rva)
Resets this RVA to a new value without unbinding from a section.
void increment(rose_addr_t amount)
Increment the address by the specified amount, keeping it attached to the same (if any) section...
rose_rva_t & set_section(SgAsmGenericSection *section)
Changes the section binding.
rose_addr_t const & get_mapped_actual_va() const
Property: Virtual address where ROSE maps this section.
rose_addr_t get_mapped_preferred_rva() const
Property: Relative virtual address where section prefers to be mapped.
virtual std::string get_string(bool escape=false) const
Property: String value.
SgAsmGenericString * get_name() const
Property: Non-unique name of section.
rose_addr_t get_rel() const
Returns an offset from the currently bound section.
SgAsmGenericSection * get_section() const
Returns the section with which this RVA is associated.
std::string to_string() const
Convert to a string representation.
rose_rva_t()
Create a zero RVA not linked to any section.
rose_rva_t operator=(const rose_rva_t &)
Assignment.