Flutter Engine
The Flutter Engine
|
#include "bin/elf_loader.h"
#include "platform/globals.h"
#include <memory>
#include <utility>
#include "bin/file.h"
#include "bin/virtual_memory.h"
#include "platform/elf.h"
#include "platform/unwinding_records.h"
Go to the source code of this file.
Classes | |
class | dart::bin::elf::Mappable |
class | dart::bin::elf::FileMappable |
class | dart::bin::elf::MemoryMappable |
class | dart::bin::elf::LoadedElf |
Namespaces | |
namespace | dart |
namespace | dart::bin |
namespace | dart::bin::elf |
Macros | |
#define | CHECK(value) |
#define | ERROR(message) |
#define | CHECK_ERROR(value, message) |
Functions | |
DART_EXPORT Dart_LoadedElf * | Dart_LoadELF (const char *filename, uint64_t file_offset, const char **error, const uint8_t **vm_snapshot_data, const uint8_t **vm_snapshot_instrs, const uint8_t **vm_isolate_data, const uint8_t **vm_isolate_instrs) |
Please see documentation for Dart_LoadElf_Fd. More... | |
DART_EXPORT Dart_LoadedElf * | Dart_LoadELF_Memory (const uint8_t *snapshot, uint64_t snapshot_size, const char **error, const uint8_t **vm_snapshot_data, const uint8_t **vm_snapshot_instrs, const uint8_t **vm_isolate_data, const uint8_t **vm_isolate_instrs) |
Please see documentation for Dart_LoadElf_Fd. More... | |
DART_EXPORT void | Dart_UnloadELF (Dart_LoadedElf *loaded) |
#define CHECK | ( | value | ) |
Definition at line 254 of file elf_loader.cc.
Definition at line 266 of file elf_loader.cc.
#define ERROR | ( | message | ) |
Definition at line 260 of file elf_loader.cc.
DART_EXPORT Dart_LoadedElf * Dart_LoadELF | ( | const char * | filename, |
uint64_t | file_offset, | ||
const char ** | error, | ||
const uint8_t ** | vm_snapshot_data, | ||
const uint8_t ** | vm_snapshot_instrs, | ||
const uint8_t ** | vm_isolate_data, | ||
const uint8_t ** | vm_isolate_instrs | ||
) |
Please see documentation for Dart_LoadElf_Fd.
Load an ELF object from a file.
On success, return a handle to the library which may be used to close it in Dart_UnloadELF. On error, returns 'nullptr' and sets 'error'. The error string should not be 'free'-d.
file_offset
may be non-zero to read an ELF object embedded inside another type of file.
Look up the Dart snapshot symbols "_kVmSnapshotData", "_kVmSnapshotInstructions", "_kVmIsolateData" and "_kVmIsolateInstructions" into the respectively named out-parameters.
Dart_LoadELF_Fd takes ownership of the file descriptor. Dart_LoadELF_Memory does not take ownership of the memory, but borrows it for the duration of the call. The memory can be release as soon as Dart_LoadELF_Memory returns.
Definition at line 590 of file elf_loader.cc.
DART_EXPORT Dart_LoadedElf * Dart_LoadELF_Memory | ( | const uint8_t * | snapshot, |
uint64_t | snapshot_size, | ||
const char ** | error, | ||
const uint8_t ** | vm_snapshot_data, | ||
const uint8_t ** | vm_snapshot_instrs, | ||
const uint8_t ** | vm_isolate_data, | ||
const uint8_t ** | vm_isolate_instrs | ||
) |
Please see documentation for Dart_LoadElf_Fd.
Definition at line 616 of file elf_loader.cc.
DART_EXPORT void Dart_UnloadELF | ( | Dart_LoadedElf * | loaded | ) |
Unloads an ELF object loaded through Dart_LoadELF{_Fd, _Memory}.
Unlike dlclose(), this does not use reference counting. Dart_LoadELF{_Fd, _Memory} will return load the target library separately each time it is called, and the results must be unloaded separately.
Definition at line 643 of file elf_loader.cc.