51 bool Displace(
const Displacement& displacement);
63 bool operator==(
const Location& other)
const;
65 Location& operator+=(offset_t value);
67 Location& operator-=(offset_t value);
70 Location operator+(Location a, offset_t b);
71 Location operator-(Location a, offset_t b);
72 std::ostream& operator<<(std::ostream& out,
const Location& location);
Represents a single offset within a section, or an absolute location in memory if the section is null...
Definition location.h:17
offset_t offset
The offset of the symbol within a section, or the absolute address.
Definition location.h:26
std::shared_ptr< Section > section
The section the symbol is located in, or null for an absolute location.
Definition location.h:22
Location(std::shared_ptr< Section > section, offset_t offset=0)
Creates a location within a section.
Definition location.h:31
Location(offset_t offset=0)
Creates an absolute location.
Definition location.h:39
Position GetPosition(bool segment_of=false) const
Calculates the address.
Definition location.cc:22
bool Displace(const Displacement &displacement)
Recalculates location after a section has moved.
Definition location.cc:8
Stores an absolute address along with the containing segment or address space.
Definition position.h:17