template <class LoadInfo>
class SegmentVmo
Defined at line 95 of file ../../src/lib/elfldltl/include/lib/elfldltl/vmar-loader.h
This can be specialized by the user for particular LoadInfo types passed
to Load(). It's constructed by Load() for each segment using the specific
LoadInfo::*Segment type, not the LoadInfo::Segment std::variant type, so
it can have a constructor that works differently for each type. The
constructor will be called with the individual segment object reference,
and the VMO for the whole file. Both will be valid for the lifetime of
the SegmentVmo object. The handle returned by .vmo() will only be used
during that lifetime. So, a specialization might return an object that
owns the VMO handle it yields.
Public Methods
void SegmentVmo<LoadInfo> ()
Defined at line 97 of file ../../src/lib/elfldltl/include/lib/elfldltl/vmar-loader.h
template <class Segment>
void SegmentVmo<LoadInfo> (const Segment & segment, zx::unowned_vmo vmo)
Defined at line 100 of file ../../src/lib/elfldltl/include/lib/elfldltl/vmar-loader.h
zx::unowned_vmo vmo ()
This is the VMO to map the segment's contents from.
Defined at line 104 of file ../../src/lib/elfldltl/include/lib/elfldltl/vmar-loader.h
std::true_type copy_on_write ()
If true and the segment is writable, make a copy-on-write child VMO.
This is the usual behavior when using the original file VMO directly.
A specialization can return anything convertible to bool.
Defined at line 109 of file ../../src/lib/elfldltl/include/lib/elfldltl/vmar-loader.h
uint64_t offset ()
This is the offset within the VMO whence the segment should be mapped
(or cloned if this->copy_on_write()).
Defined at line 113 of file ../../src/lib/elfldltl/include/lib/elfldltl/vmar-loader.h