Skip to content

Commit 0f28464

Browse files
sjindel-googlecommit-bot@chromium.org
authored andcommitted
[vm] Improve docs for Dart_LoadELF.
Change-Id: Ied56910220fb6599b374f8adc3091fb696a49b5f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138088 Reviewed-by: Samir Jindel <[email protected]> Commit-Queue: Samir Jindel <[email protected]>
1 parent 029c8f1 commit 0f28464

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

runtime/bin/elf_loader.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ DART_EXPORT Dart_LoadedElf* Dart_LoadELF_Fd(int fd,
3737
#endif
3838

3939
#if !defined(__Fuchsia__)
40+
/// Please see documentation for Dart_LoadElf_Fd.
4041
DART_EXPORT Dart_LoadedElf* Dart_LoadELF(const char* filename,
4142
uint64_t file_offset,
4243
const char** error,
@@ -46,6 +47,7 @@ DART_EXPORT Dart_LoadedElf* Dart_LoadELF(const char* filename,
4647
const uint8_t** vm_isolate_instrs);
4748
#endif
4849

50+
/// Please see documentation for Dart_LoadElf_Fd.
4951
DART_EXPORT Dart_LoadedElf* Dart_LoadELF_Memory(
5052
const uint8_t* snapshot,
5153
uint64_t snapshot_size,
@@ -55,6 +57,11 @@ DART_EXPORT Dart_LoadedElf* Dart_LoadELF_Memory(
5557
const uint8_t** vm_isolate_data,
5658
const uint8_t** vm_isolate_instrs);
5759

60+
/// Unloads an ELF object loaded through Dart_LoadELF{_Fd, _Memory}.
61+
///
62+
/// Unlike dlclose(), this does not use reference counting.
63+
/// Dart_LoadELF{_Fd, _Memory} will return load the target library separately
64+
/// each time it is called, and the results must be unloaded separately.
5865
DART_EXPORT void Dart_UnloadELF(Dart_LoadedElf* loaded);
5966

6067
#endif // RUNTIME_BIN_ELF_LOADER_H_

0 commit comments

Comments
 (0)