template <class Segment>
class WithVmo
Defined at line 98 of file ../../src/lib/elfldltl/include/lib/elfldltl/segment-with-vmo.h
Segment types that have a filesz() are replaced with this subclass.
ZeroFillSegment never needs a VMO handle.
Public Methods
void WithVmo<Segment> (WithVmo<Segment> && )
It's movable, though not copyable. The base Segment type is copyable.
Defined at line 103 of file ../../src/lib/elfldltl/include/lib/elfldltl/segment-with-vmo.h
void WithVmo<Segment> (const Segment & other)
It's explicitly constructible from the base Segment type.
Defined at line 106 of file ../../src/lib/elfldltl/include/lib/elfldltl/segment-with-vmo.h
WithVmo<Segment> & operator= (WithVmo<Segment> && )
Defined at line 108 of file ../../src/lib/elfldltl/include/lib/elfldltl/segment-with-vmo.h
WithVmo<Segment> & operator= (const Segment & other)
Assigning from the base Segment type drops any previous VMO.
Defined at line 111 of file ../../src/lib/elfldltl/include/lib/elfldltl/segment-with-vmo.h
template <class Other>
bool CanMergeWith (const Other & other)
Don't merge with any other segment if there's a VMO installed. Its
contents won't cover the other segment. Both segments will get the
reciprocal check, so if this segment has no VMO (yet) but the other
does, its CanMergeWith is the one to return false.
Defined at line 121 of file ../../src/lib/elfldltl/include/lib/elfldltl/segment-with-vmo.h
bool CanReplace ()
Similar to `CanMergeWith`, this segment can't be replaced by another
segment if there's a VMO installed.
Defined at line 129 of file ../../src/lib/elfldltl/include/lib/elfldltl/segment-with-vmo.h
template <class Diagnostics, class OtherSegment>
fit::result<bool, WithVmo<Segment>> Copy (Diagnostics & diag, const OtherSegment & other)
This accepts the corresponding segment type either from the base
(unwrapped) LoadInfo::*Segment type or from a SegmentWithVmo wrapper
like this one. Both SegmentWithVmo::Copy and SegmentWithVmo::NoCopy
versions of the corresponding Segment subclass are accepted. The VMOs
are always cloned--the only distinction of NoCopy is what a VmarLoader
does with these new segment VMOs (NoCopy writes them in place).
Defined at line 142 of file ../../src/lib/elfldltl/include/lib/elfldltl/segment-with-vmo.h