android: crazy_linker: Allow searching libraries inside zip archives.
This modifies the internal crazy::SearchPathList class to support
looking up libraries inside zip archives, in two ways:
- First, by supporting paths with an exclamation mark, used
as a delimiter between zip archive paths, and file sub-paths
within it. For example, looking for:
/path/to/archive.zip!libs/libfoo.so
Will search the zip archive at /path/to/archive.zip for a
file named libs/libfoo.so.
Note that path items added through AddPaths() can also
contain an exclamation mark.
- Second, automatically support zip files stored with a
'crazy.' prefix (e.g. /path/to/archive.zip!libs/libfoo.so
will match a file named 'libs/crazy.libfoo.so' in the
archive too.
This is useful to store uncompressed libraries inside
Android APKs while preventing the system from extracting
them when the application is installed or updated.
Note that this does not modify the rest of the crazy linker to
use this for now (e.g. to implement LoadLibraryFromZipFile()),
since this will require more work (to be provided in a future CL).
BUG=802068
R=agrieve@chromium.org,pasko@chromium.org,lizeb@chromium.org
Change-Id: Ic8661332e4e4537a472e325b74c8c001ea2bc113
Reviewed-on: https://chromium-review.googlesource.com/1042394
Commit-Queue: David Turner <digit@chromium.org>
Reviewed-by:
agrieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557131}
Showing
Please register or sign in to comment