Add ANDROID_DLEXT_FORCE_LOAD flag

This flag allows to force loading of the library
  in the case when for some reason multiple ELF files
  share the same filename (because the already-loaded
  library has been removed and overwritten, for example).

Change-Id: I798d44409ee13d63eaa75d685e99c4d028d2b0c1
This commit is contained in:
Dmitriy Ivanov
2015-04-02 16:03:56 -07:00
parent ab7c79e22e
commit 9b82136b98
3 changed files with 60 additions and 12 deletions

View File

@@ -59,16 +59,28 @@ enum {
/* If opening a library using library_fd read it starting at library_fd_offset.
* This flag is only valid when ANDROID_DLEXT_USE_LIBRARY_FD is set.
*/
ANDROID_DLEXT_USE_LIBRARY_FD_OFFSET = 0x20,
/* When set, do not check if the library has already been loaded by file stat(2)s.
*
* This flag allows forced loading of the library in the case when for some
* reason multiple ELF files share the same filename (because the already-loaded
* library has been removed and overwritten, for example).
*
* Note that if the library has the same dt_soname as an old one and some other
* library has the soname in DT_NEEDED list, the first one will be used to resolve any
* dependencies.
*/
ANDROID_DLEXT_FORCE_LOAD = 0x40,
/* Mask of valid bits */
ANDROID_DLEXT_VALID_FLAG_BITS = ANDROID_DLEXT_RESERVED_ADDRESS |
ANDROID_DLEXT_RESERVED_ADDRESS_HINT |
ANDROID_DLEXT_WRITE_RELRO |
ANDROID_DLEXT_USE_RELRO |
ANDROID_DLEXT_USE_LIBRARY_FD |
ANDROID_DLEXT_USE_LIBRARY_FD_OFFSET,
ANDROID_DLEXT_USE_LIBRARY_FD_OFFSET |
ANDROID_DLEXT_FORCE_LOAD,
};
typedef struct {