Commit Graph

4 Commits

Author SHA1 Message Date
Inseob Kim c3ae5fd182 Restrict libraires from VM payload libraries
... so only the select libraries can be linked against. It includes
libc, libm, libdl, liblog, libvm_payload, etc.

Bug: 259311868
Test: atest MicrodroidTests MicrodroidHostTestCases
Change-Id: I5cbdaa8195a04a904a766f34a0def4b00ccfc904
2022-11-30 18:28:22 +09:00
Alan Stokes 52d3c72649 Remove support for command-line args
We no longer support passing string arguments to a VM. Any
customization needed can be done by having the host communicate with
the VM after it starts.

Also start adding a header to provide the entry-point prototype for
better safety.

Bug: 249064104
Bug: 243513572
Test: atest MicrodroidTests MicrodroidHostTestCases
Change-Id: I0a1775f3b6a0b11c71c4831f6c380d96bb637c00
2022-10-17 15:06:26 +01:00
Jiyong Park fe5b28ef8e A lib in APK can depend on other libs in the same APK
This hasn't worked because the path /mnt/apk/lib/<abi> wasn't in the
search paths of the linker namespace that the library is loaded (which
is the default namespace).

Fixing that by creating a new linker namespace 'microdroid' that
inherits the settings from the default namespace but adds the library
directory to the search paths, and loading the library from that
namespace.

Bug: N/A
Test: atest MicrodroidHostTestCases

Change-Id: I30c4ce86a48b80fa65e3b5ffeb90561fa1d2544e
2021-06-24 01:36:37 +09:00
Jiyong Park 4069961147 Add microdroid_launcher
microdroid_launcher is a very thin executable that loads a shared
library and execute the entry function (android_native_main). This is
used to execute a shared library in an APK that is shared from the host
Android.

Bug: 188513012
Test: atest MicrodroidHostTestCases
Change-Id: I0f98eba4c72601adaa27733dae6a51d3852301db
2021-05-24 17:48:30 +09:00