template <class LoadInfo>

class GetMutableMemory

Defined at line 340 of file ../../src/lib/elfldltl/include/lib/elfldltl/segment-with-vmo.h

elfldltl::SegmentWithVmo::GetMutableMemory must be instantiated with a

LoadInfo type using SegmentWithVmo wrapper types, and created with a

zx::unowned_vmo for the original file contents. It can then be used to

construct an elfldltl::LoadInfoMutableMemory adapter object (see details

in

<lib

/elfldltl/loadinfo-mutable-memory.h>), which provides the mutation

calls in the Memory API. When mutation requests are made on that Memory

object, the GetMutableMemory callback will be used to map in the mutable

VMO for the segment contents. The mutable VMO is created via MakeMutable

if needed, and then stored in the LoadInfo::Segment object for later use.

The callable object itself is copyable and default-constructible

(requiring later copy-assignment to be usable). Note that it holds (and

copies) the unowned handles passed in the constructor, so users are

responsible for ensuring those handles remain valid for the lifetime of

the callable object. The optional second argument to the constructor is a

zx::unowned_vmar used for making mappings, default zx::vmar::root_self().

Public Methods

void GetMutableMemory<LoadInfo> ()

Defined at line 345 of file ../../src/lib/elfldltl/include/lib/elfldltl/segment-with-vmo.h

void GetMutableMemory<LoadInfo> (const GetMutableMemory<LoadInfo> & )

Defined at line 347 of file ../../src/lib/elfldltl/include/lib/elfldltl/segment-with-vmo.h

void GetMutableMemory<LoadInfo> (zx::unowned_vmo vmo, zx::unowned_vmar vmar)

Defined at line 349 of file ../../src/lib/elfldltl/include/lib/elfldltl/segment-with-vmo.h

GetMutableMemory<LoadInfo> & operator= (const GetMutableMemory<LoadInfo> & )

Defined at line 352 of file ../../src/lib/elfldltl/include/lib/elfldltl/segment-with-vmo.h

template <class Diagnostics>
Result operator() (Diagnostics & diag, Segment & segment)

Defined at line 355 of file ../../src/lib/elfldltl/include/lib/elfldltl/segment-with-vmo.h