Skip to content

[vm/ffi] Native asset resolution via embedder #55523

@dcharkes

Description

@dcharkes

We should call out to the embedder to resolve native assets and symbols.

This would enable the embedder resolving symlinks:

Also it would enable the embedder not having the files on disk at all or having the as part of a larger file and using dlopen_with_offset.

The embedder would provide an API for dlopen(), dlclose(), dlsym(), dladdr().

The embedder API would be tied to the new native assets feature. So dlopen would take a native assets mapping such as ['relative', 'some/file/path.so'] or ['process']. (As such it would not be used for DynamicLibrary.open and DynamicLibrary.lookup. #37771)

Having a dlclose embedder callback is only useful when we unload dynamic libraries on isolate group shutdown:

Having a dladdr embedder callback is only if we add some functionality that uses this. We currently don't have such functionality.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.library-ffi

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions