21 std::optional<std::string> segment;
22 std::variant<std::string, offset_t> offset;
24 Reference(std::variant<std::string, offset_t> offset = offset_t(0))
25 : segment(), offset(offset)
29 Reference(std::string segment, std::variant<std::string, offset_t> offset = offset_t(0))
30 : segment(segment), offset(offset)
40 std::ostream& operator<<(std::ostream& out,
const Reference& ref);
Represents a single offset within a section, or an absolute location in memory if the section is null...
Definition location.h:17
Encodes an object module file as a collection of sections, symbols and relocations.
Definition module.h:20
Represents a reference stored in a linker script.
Definition reference.h:19
Location ToLocation(Module &module) const
Converts to location, resolving the symbol if it is a symbol.
Definition reference.cc:14